Only declare var_SampleToView in lightall shader when it is actually used.

This commit is contained in:
James Canete 2012-12-15 00:39:17 +00:00
parent d79ea2e5cd
commit 082ecc4d6c
2 changed files with 4 additions and 2 deletions

View file

@ -46,7 +46,9 @@ varying vec4 var_Color;
varying vec3 var_Position; varying vec3 var_Position;
#endif #endif
#if defined(USE_TCGEN) || defined(USE_NORMALMAP) || (defined(USE_LIGHT) && !defined(USE_FAST_LIGHT))
varying vec3 var_SampleToView; varying vec3 var_SampleToView;
#endif
#if !defined(USE_FAST_LIGHT) #if !defined(USE_FAST_LIGHT)
varying vec3 var_Normal; varying vec3 var_Normal;

View file

@ -65,7 +65,7 @@ varying vec2 var_DiffuseTex;
varying vec2 var_LightTex; varying vec2 var_LightTex;
#endif #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; varying vec3 var_SampleToView;
#endif #endif
@ -154,7 +154,7 @@ void main()
vec3 SampleToView = u_ViewOrigin - position.xyz; vec3 SampleToView = u_ViewOrigin - position.xyz;
#endif #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; var_SampleToView = SampleToView;
#endif #endif