- Home /
Issues Mixing Color with Semitransparent Materials
I'm building a game that involves overlapping semitransparent colored blocks to create new colors. However, I'm finding that some of the color values are not coming out as they should, the most notable example being that when I overlay a semitransparent red cube with a semitransparent green cube, the resulting color is not yellow but rather a murky brown.
Does anyone know why additive color principles would not apply properly in this situation?
Thanks
Answer by tanoshimi · Jul 31, 2016 at 03:59 PM
Because the default blend mode for transparent shaders is not additive blending, it's alpha blending. If you want additive blending you should change:
Blend SrcAlpha OneMinusSrcAlpha
to:
Blend One One
Thanks very much! Do you know how I could achieve this using the transparency rendering mode of the standard shader?
From memory the standard shader has its blending modes stored as private properties, which you could be able to change outside the shader.
Your answer
Follow this Question
Related Questions
Transparent shader with color property and no lighting help 1 Answer
surface shader homeworld (space) colorize transparent 1 Answer
Problem with coloring mesh with shaders properly 1 Answer
Additive particle shader with higher max alpha? 0 Answers
Shader for semi-Transparent object with highlighted Edges 1 Answer