[quake3-commits] r2382 - trunk/code/rend2/glsl

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Dec 14 19:39:17 EST 2012


Author: smiletheory
Date: 2012-12-14 19:39:17 -0500 (Fri, 14 Dec 2012)
New Revision: 2382

Modified:
   trunk/code/rend2/glsl/lightall_fp.glsl
   trunk/code/rend2/glsl/lightall_vp.glsl
Log:
Only declare var_SampleToView in lightall shader when it is actually used.

Modified: trunk/code/rend2/glsl/lightall_fp.glsl
===================================================================
--- trunk/code/rend2/glsl/lightall_fp.glsl	2012-12-14 07:32:07 UTC (rev 2381)
+++ trunk/code/rend2/glsl/lightall_fp.glsl	2012-12-15 00:39:17 UTC (rev 2382)
@@ -46,7 +46,9 @@
 varying vec3      var_Position;
 #endif
 
+#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || (defined(USE_LIGHT) && !defined(USE_FAST_LIGHT))
 varying vec3      var_SampleToView;
+#endif
 
 #if !defined(USE_FAST_LIGHT)
 varying vec3      var_Normal;

Modified: trunk/code/rend2/glsl/lightall_vp.glsl
===================================================================
--- trunk/code/rend2/glsl/lightall_vp.glsl	2012-12-14 07:32:07 UTC (rev 2381)
+++ trunk/code/rend2/glsl/lightall_vp.glsl	2012-12-15 00:39:17 UTC (rev 2382)
@@ -65,7 +65,7 @@
 varying vec2   var_LightTex;
 #endif
 
-#if defined(USE_NORMALMAP) || defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
+#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || (defined(USE_LIGHT) && !defined(USE_FAST_LIGHT))
 varying vec3   var_SampleToView;
 #endif
 
@@ -154,7 +154,7 @@
 	vec3 SampleToView = u_ViewOrigin - position.xyz;
 #endif
 
-#if defined(USE_NORMALMAP) || defined(USE_LIGHT) && !defined(USE_FAST_LIGHT)
+#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || (defined(USE_LIGHT) && !defined(USE_FAST_LIGHT))
 	var_SampleToView = SampleToView;
 #endif
 



More information about the quake3-commits mailing list