Hey all, I’ve been researching every possible angle on this one. I am a bit stumped.
Right now, I am completing the unification of my shaders into a simple multi-compile solution on Unity 4.6.3. I have a custom inspector working, and all of my multicompile features within the CGPROGRAM of the script is working great. No complaints there.
What I can’t figure out is toggling the Blend keyword and SubShader tags to change the RenderType and Queue depending on what the material is being used for. From what I can tell so far, this is not possible. If it is, please enlighten me! I’m very interested in binding this to a precompiled solution and my Google-Fu is failing me.
Another way I’m looking at this problem is understanding how the Blend keyword operates in ShaderLab. In the context of mobile shader development and avoiding unnecessary blending whenever possible (like OpenGL ES 2.0 specifically with PowerVR devices), is Unity smart enough to know when I’m not using any alpha values other than 1, and “boil out” that blending process? My assumption is, “No, it is not that smart, and it is always blending.” Any insights on the specifics of this would be appreciated!
Presently, my next point to test is to fidget around with some #if define directives and see if I can use Material.Enable/DisableKeyword. Wish me luck.
-d