mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-14 06:01:10 +00:00
Only declare var_SampleToView in lightall shader when it is actually used.
This commit is contained in:
parent
d79ea2e5cd
commit
082ecc4d6c
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue