- Home /
How to add feature to Standard.Shader?
In our game we're currently switching all of our custom shaders to the Standard Shaders Bundle that Unity provides to fix a lot of errors and such with our legacy shaders we got online long agoand some we made a few years back. Everything is looking perfect with the new shaders but we need a few small features added to Standard.Shaders.
Our game has a key feature where the player scans an object to learn more about it, well when they're going between items deciding what to scan the item has a light blue pulsating highlight effect which we have the shader code for but aren't sure how to add it into Standard.Shader. We've already figured out how to change the GUI with the StandardShaderGUI.cs but aren't able to implement the shader code correctly.
I've added a new SubShader at the top and basically copy/pasted the code in there and it worked but it made a lot of the other features such as Metallic and Smoothness stop working. Pretty sure we're going about this wrong and not sure what's up. Any ideas?
Thanks so much for your help!!
I would recommend using a surface shader rather than directly modifying the built-in standard shader, as they both look and work identically but surface shaders allow for direct modification. By default, creating a new surface shader should use the standard lighting model.