mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +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;
|
||||
#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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue