#5812 - Use refdef's coordinates when drawing to screen shadow fbo, and separate depth texture and screen texture coordinates in glsl shaders.

This commit is contained in:
James Canete 2012-12-06 01:55:45 +00:00
parent 736e1d5170
commit 374c551404
5 changed files with 33 additions and 32 deletions

View file

@ -92,10 +92,6 @@ varying vec3 var_VertLight;
varying vec3 var_WorldLight;
#endif
#if defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT) && defined(USE_SHADOWMAP)
varying vec4 var_ScreenPos;
#endif
#if defined(USE_TCMOD)
vec2 ModTexCoords(vec2 st, vec3 position, vec4 texMatrix, vec4 offTurb)
{
@ -133,10 +129,6 @@ void main()
gl_Position = u_ModelViewProjectionMatrix * position;
#if defined(USE_LIGHT_VECTOR) && !defined(USE_FAST_LIGHT) && defined(USE_SHADOWMAP)
var_ScreenPos = gl_Position + vec2(1.0, 0.0).xxyx * gl_Position.w;
#endif
#if (defined(USE_LIGHTMAP) || defined(USE_LIGHT_VERTEX)) && !defined(USE_DELUXEMAP) && !defined(USE_FAST_LIGHT)
vec3 worldLight = attr_LightDirection;
#endif