- Home /
How to not require normals in a surface shader
I've written a stripped down version of the lightmapped lambert shader without any reference to o.Normal, yet when I apply the shader it always gives the warning that the shader requires normals and the mesh doesn't have them. How can I strip out all the implied normal requirements from a surface shader?
Answer by Owen-Reynolds · Feb 27, 2014 at 04:11 PM
I think it's impossible because: lightning uses normals, and all surface shaders automatically add extra lighting code (which uses o.Normal
.)
But, as a corollary, if you don't have normals, you don't want lighting (in other words, unlit, or use the colors exactly as you see them.) So don't use a surface shader.
Instead, use a, umm, regular non-surface shader. Not the shaderLab one -- the one that looks like a surface shader but is missing "surf." The "army man" shader page has an example near the bottom. Those shaders do only exactly what you've written.