Is there any way to create a shader property for cull or ztest? I have one shader I’d like to apply to all of my meshes, but there are a handful that I want to change the cull settings on.
I looked at the ShaderLab documentation and I couldn’t see any way to have “cull” or “ztest” be accessible as properties.
I was thinking of creating a separate vector property _myCull and then somehow using this to say if the _myCull was (1, 0, 0, 0) then cull off, if it was (0, 0, 0, 0) then cull back. Is something like that possible in a shader? I’ve modified a few of the built-in shaders but I’ve never had to deal with conditionals in this way.
This was a question from 2008 (thus for Unity 2.0), and that link is from 2014 (and is the same Aras who originally responded to this thread) talking about a feature added in 2013 to Unity 4.3.
But yes, you can do this now for pretty much every shader setting.