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;
#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;

View File

@ -65,7 +65,7 @@ varying vec2 var_DiffuseTex;
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 @@ void main()
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