Avoid needless second pass on non-glow particles.

This commit is contained in:
Shyotl
2013-11-13 02:27:01 -06:00
parent 3ed249cba5
commit ba84bf1461
2 changed files with 3 additions and 1 deletions

View File

@@ -716,7 +716,8 @@ void LLVOPartGroup::getGeometry(S32 idx,
*colorsp++ = color;
*colorsp++ = color;
//if (pglow.mV[3] || part.mGlow.mV[3])
//Only add emissive attributes if glowing (doing it for all particles is INCREDIBLY inefficient as it leads to a second, slower, render pass.)
if (pglow.mV[3] > F_ALMOST_ZERO || part.mGlow.mV[3] > F_ALMOST_ZERO)
{ //only write glow if it is not zero
*emissivep++ = pglow;
*emissivep++ = pglow;