diff options
| author | James Canete <use.less01@gmail.com> | 2012-12-15 00:39:17 +0000 | 
|---|---|---|
| committer | Tim Angus <tim@ngus.net> | 2013-01-12 21:26:41 +0000 | 
| commit | ea110e3aa0bf01bea7b95e885d60db9effd7571f (patch) | |
| tree | df4488836331a0defbde55d5f2faee2a5c093aa3 /src/rend2/glsl | |
| parent | df12163f441f9c10955645ef8fdfe99f5f68d182 (diff) | |
Only declare var_SampleToView in lightall shader when it is actually used.
Diffstat (limited to 'src/rend2/glsl')
| -rw-r--r-- | src/rend2/glsl/lightall_fp.glsl | 2 | ||||
| -rw-r--r-- | src/rend2/glsl/lightall_vp.glsl | 4 | 
2 files changed, 4 insertions, 2 deletions
diff --git a/src/rend2/glsl/lightall_fp.glsl b/src/rend2/glsl/lightall_fp.glsl index 186ea4b0..ec9bb2dc 100644 --- a/src/rend2/glsl/lightall_fp.glsl +++ b/src/rend2/glsl/lightall_fp.glsl @@ -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; diff --git a/src/rend2/glsl/lightall_vp.glsl b/src/rend2/glsl/lightall_vp.glsl index d3c61683..05a41f4d 100644 --- a/src/rend2/glsl/lightall_vp.glsl +++ b/src/rend2/glsl/lightall_vp.glsl @@ -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  | 
