Only declare var_SampleToView in lightall shader when it is actually used.
This commit is contained in:
1 parent
d79ea2e5cd
commit
082ecc4d6c
2 files changed
+4
-2
No files matched your search
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user