- Home /
Setting renderstate conditionally in the shader
I want to use a shader wherein the vertex and fragment programs are the same, but the render state can be different -- in particular, the blend state's either BlendOver or BlendUnder.
Without making two shaders for this, can I conditionally set the state in a single shader?
Comment
Best Answer
Answer by raja-bala · Feb 13, 2015 at 12:16 AM
Apparently, this can be done using shader properties. See http://answers.unity3d.com/questions/161945/is-it-possible-to-change-blend-mode-in-shader-at-r.html
Your answer

Follow this Question
Related Questions
How to move vertices up/down randomly in shader. 1 Answer
Can anyone help me with reflective shader with fall off property? 0 Answers
How do you hide a shader property? 2 Answers
Logical BlendOp not working 0 Answers
Shader - What is float3.xy? 1 Answer