I’m trying to create a shader that is based off of the Unity Standard shader with all of the options it has available, but it is starting to look overly complex. Am I going down the right path? Am I missing something obvious?
The steps that I have come up with to add a new material to the process of rendering my object:
- Copy the Standard.shader and rename it to MyCustom.shader.
- Add a new texture slot to it.
- Copy the StandardShaderGUI.cs file and rename to MyCustomGUI.cs.
- At the bottom of the file, point MyCustom.shader to MyCustomGUI.cs.
- Add the texture slot to the .cs file so that it shows up in the inspector. (Requires entries in multiple places to get it to work the same as the existing entries)
- Copy UnityStandardCore.cginc and rename it MyCustomCore.cginc.
- Point to MyCustomCore.cginc in the shader multiple times, depending on the pass.
- Adjust the vert and frag shaders in the .cginc to use the new texture that was added.