I am writing a complex shader and i want a simple option how to turn the surface effect on and off, done by defining material shader keywords.
I would also like to disable a pass that renders cull:front - the interior of the mesh - when the effect is off, and I’d like to avoid having to sync two or more properties. Is it possible to skip a pass entirely based on these symbols?
No you can’t but, from memory I was able to simulate the same result by defining passes with different LOD and then setting Shader.maximumLOD: Unity - Manual: ShaderLab: assigning a LOD value to a SubShader
@Pangamini,
No you can’t (by design). What you can do is to have a lightweight version of your vertex/fragment programs in that pass based on some Keywords define but still the pass needs to happen (you can’t avoid the pass).
Would be awesome if we can enable/disable passes with the Material.SetPass() function. -__-