Open up the SimpleDiffuse shader you've created and make the following changes:
- In the Properties section, remove all of the variables except for _Color:
Properties { _Color ("Color", Color) = (1,1,1,1) }
- From the SubShader{} section, remove the _MainTex, _Glossiness, and _Metallic variables. You should not remove the reference to uv_MainTex as Cg does not allow the Input struct to be empty. The value will simply be ignored.
- Also, remove the UNITY_INSTANCING_BUFFER_START/END macros and the comments used with them.
- Remove the content of the surf() function and replace it with the following:
void surf (Input IN, inout SurfaceOutputStandard o) { o.Albedo = _Color.rgb; }
- Your shader should look as follows:
Shader "CookbookShaders/Chapter03/SimpleDiffuse" ...