The problem goes as follows. I have a particle effect who's vertex buffer contains semi-transparent vertex colors. The material which controls the drawing of this effect is defined with emissive and diffuse vertex color tracking.
When drawing the effect without RTSS the effect is semi-transparent. when with the RTSS the effect is completely opaque.
This problem is actually caused because of 2 bugs:
- The emissive color default value is (0 0 0 1) instead of what the documentation say which is (0 0 0 0)
- The RTSS takes into account the alpha value of the emissive color. Which at least under these circumstances it should not. In fact as far as I can see in the fixed pipelife the alpha value is only modulated by the alpha of the diffuse color.
- Set the default value of emissive color to (0 0 0 0) - This is probably the simplest fix but might not be backward compatible.
- Only take into consideration the diffuse color when modulating the alpha color channel - I'm not sure this is always true. I'm not an expert on fixed pipelines.
- Both.
- Don't fix anything - Just put "emissive 0 0 0 0" in all such materials. This fixes the problem.