Sitemap

Unity Coder Corner

UCC is the one stop shop for everything Unity3d. From tutorials, to news, to opinon pieces. Find everything related to Unity3d here.

Unity Shader Graph: Creating a Custom Specular Shader

6 min readJun 27, 2023

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.

Press enter or click to view image in full size
Creating a new URP unlit shader graph

Step 2: Setting Our Shader Properties

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web
Already have an account? Sign in
Unity Coder Corner

Published in Unity Coder Corner

UCC is the one stop shop for everything Unity3d. From tutorials, to news, to opinon pieces. Find everything related to Unity3d here.

Michael Quinn

Written by Michael Quinn

I’m a foodie and a software engineer. I write about C# development, .NET, Unity, Unreal, and Shaders

Responses (1)

Write a response

Good tutorial but the use of gifs isn't very helpful. Screenshots would be better.

2