- Home /
Best way to make an unlit Cg shader
What's the best way to write an unlit Cg fragment shader? We're writing a very computationally intensive sky shader so I'd like to eliminate unnecessary overhead to save time — particularly light calculations since it's an unlit object.
Adding "Lighting Off" doesn't seem to have any effect. (Why is that?)
Answer by ScroodgeM · Jul 20, 2012 at 07:11 AM
vertex/fragment (not surface) shaders are unlit by default - there's no lighting calculations, so shader writed as vertex/fragment does not support lighting
so answer - link below is the best way to write an unlit Cg fragment shader.
http://docs.unity3d.com/Documentation/Components/SL-ShaderPrograms.html
Your answer
Follow this Question
Related Questions
Prevent ColorMask obscuring parts of an object's mesh 0 Answers
Unexpected behavior in Vertex/Fragment shader when using saturate method (CG) 0 Answers
Access to svPosition in fragment shader 1 Answer
Projected Texture Shader Issues 1 Answer
How do I add transparency to a cg vertex lit shader 2 Answers