r714 - trunk/code/renderer

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Apr 20 12:52:39 EDT 2006


Author: thilo
Date: 2006-04-20 12:52:39 -0400 (Thu, 20 Apr 2006)
New Revision: 714

Modified:
   trunk/code/renderer/tr_flares.c
   trunk/code/renderer/tr_shader.c
Log:
Still some little improvements to flares.


Modified: trunk/code/renderer/tr_flares.c
===================================================================
--- trunk/code/renderer/tr_flares.c	2006-04-20 11:26:27 UTC (rev 713)
+++ trunk/code/renderer/tr_flares.c	2006-04-20 16:52:39 UTC (rev 714)
@@ -354,13 +354,17 @@
 	VectorScale(f->color, f->drawIntensity * tr.identityLight * intensity, color);
 
 // Calculations for fogging
-	if(f->fogNum)
+	if(f->fogNum < tr.world->numfogs)
 	{
 		tess.numVertexes = 1;
 		VectorCopy(f->origin, tess.xyz[0]);
 		tess.fogNum = f->fogNum;
 	
 		RB_CalcModulateColorsByFog(fogFactors);
+		
+		// We don't need to render the flare if colors are 0 anyways.
+		if(!fogFactors[0] && !fogFactors[1] && !fogFactors[2])
+			return;
 	}
 
 	iColor[0] = color[0] * fogFactors[0];

Modified: trunk/code/renderer/tr_shader.c
===================================================================
--- trunk/code/renderer/tr_shader.c	2006-04-20 11:26:27 UTC (rev 713)
+++ trunk/code/renderer/tr_shader.c	2006-04-20 16:52:39 UTC (rev 714)
@@ -3018,7 +3018,10 @@
 		int index;
 		
 		for(index = 0; index < tr.flareShader->numUnfoggedPasses; index++)
+		{
 			tr.flareShader->stages[index]->adjustColorsForFog = ACFF_NONE;
+			tr.flareShader->stages[index]->stateBits |= GLS_DEPTHTEST_DISABLE;
+		}
 	}
 
 	tr.sunShader = R_FindShader( "sun", LIGHTMAP_NONE, qtrue );




More information about the quake3-commits mailing list