Implementing a simple Shader Graph
To get acquainted with the interface of Shader Graph, let's create something similar to what we have seen before by sampling a texture to create a simple shader.
Getting ready
Ensure that you have created a project using the URP, as described in the Creating a URP-based Shader Graph project recipe. Afterward, complete the following steps:
- Create a new scene, if you haven't done so already, by going to File | New Scene.
- Afterward, we need to have something to show our shader, so let's create a new sphere by going to GameObject | 3D Object | Sphere:
How to do it...
We will start off by creating a simple shader graph:
- From the Project window, create a new shader by going to Create | Shader | Universal Render Pipeline | Lit Shader Graph, and name it
SimpleGraph
. For organization, I placed the graph within a new folder (Chapter 13/Shaders...