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?


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


Blend One One