summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-12-06 11:30:27 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2011-12-06 11:30:27 -0500
commit97a92deb18d09e030c0800107204d9776a3c6229 (patch)
tree16133351b0822937c5da1e7009e80e3157119d59 /indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
parentae2a1ea9f10dc9bf3cc5ef59f1428ea1e5fa6495 (diff)
parent95850eddfd26e85dcfa1dd6f71233b6e0bf08253 (diff)
reconciled .hgtags
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 1809cff1e5..229c2f4b67 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -22,11 +22,13 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
//class 2, shadows, no SSAO
uniform sampler2DRect depthMap;
@@ -47,13 +49,13 @@ uniform float ssao_max_radius;
uniform float ssao_factor;
uniform float ssao_factor_inv;
-varying vec2 vary_fragcoord;
-varying vec4 vary_light;
+VARYING vec2 vary_fragcoord;
uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform vec2 shadow_res;
uniform vec2 proj_shadow_res;
+uniform vec3 sun_dir;
uniform float shadow_bias;
uniform float shadow_offset;
@@ -132,10 +134,10 @@ void main()
}*/
float shadow = 1.0;
- float dp_directional_light = max(0.0, dot(norm, vary_light.xyz));
+ float dp_directional_light = max(0.0, dot(norm, sun_dir.xyz));
vec3 shadow_pos = pos.xyz + displace*norm;
- vec3 offset = vary_light.xyz * (1.0-dp_directional_light);
+ vec3 offset = sun_dir.xyz * (1.0-dp_directional_light);
vec4 spos = vec4(shadow_pos+offset*shadow_offset, 1.0);