foreword
With the continuous upgrading of the Unity version, URP (Programmable Rendering Pipeline) is becoming more and more popular. No matter in terms of effect or performance, it is the old version of build-in-shader. So we have to start embracing URP anyway, and it's time to upgrade Unity.
engine version
I chose the Unity 2021.3.23f1 version here, as long as you choose the version between Unity2019-2021, you can.
create project
We can use the URP template to create a project. Our article is mainly about how to configure URP, so we create an empty 3D project and wait for a step-by-step configuration of the URP environment.
Configure the URP environment
We install the URP package through PackageManager, and it will automatically install the ShaderGraph package. If it is not installed automatically, please install ShaderGraph manually. Finally, please install URP Package Samples, which contains some shader examples and scenes for us to learn and use.
To configure the URP Global Setting, you can create a new one or select the URP Glable Settings of Samples
. Well, at this point, the URP configuration is complete.
Upgrade Build-In to URP
If we already have a lot of Build-In shaders or Material materials in our project. We will send them programming Magenta first, URP provides us with tools to upgrade to URP in batches
Create URPs
We use ShaderGraph to create our first URP
After the creation is successful, double-click the .shadergraph file to open the ShaderGraph panel, as shown below:
Getting to know ShaderGraph for the first time
Let's not talk about too much detail in this article, let's simply look at the layout of ShaderGraph
add node
We right-click CreateNode on the ShaderGraph panel to create a node.
We can drag and drop casually. For example, I added a Texture and Color to multiply and assign to the final fragment color.
at last
Well, this article is here,