Member-only story
Unity Shader Graph: Creating a Custom Specular Shader
In the last article we dove into the Lambert light model and created a custom diffuse shader. In this article we are going to use the Blinn-Phong light model to make a custom specular shader using the Shader Graph. If you haven’t already, check out my whole Unity Shader Graph series.
The editor version used in this example is 2022.3.2 URP
We will cover:
- Create a URP unlit shader
- Create a custom specular lit shader
- Introduce the normalize node, add node, saturate node, view direction node, and power node
- Continue working with shader properties
Prerequisites
Just have Unity and the Unity Shader Graph ready. This should work in URP 2020, 2021, and this example is in 2022.3.
Optional: Read Intro to Shader Graph
The Steps
Step 1: Make a New Shader
Okay first step is to make a new unlit URP shader in the shader graph.
We are going to right-click the project window, then select Create->Shader Graph->URP->Unlit Shader Graph.