summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-08-24 15:41:00 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-08-24 15:41:00 -0700
commitbf0d36bf889bb913fbc2a53c5a1b9818acb11ee6 (patch)
tree62e75dd7ea2791addced07fa595dd37789cc12cc /indra/newview/app_settings/shaders/class2
parent11d7a7f197d31617602ff9c109674a783fd6fa71 (diff)
Mac rendering now with 100% fewer crashes when enabling shadows.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl4
2 files changed, 4 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..146fac56e9 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -48,12 +48,12 @@ uniform float ssao_factor;
uniform float ssao_factor_inv;
varying vec2 vary_fragcoord;
-varying vec4 vary_light;
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 +132,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);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
index 827ec15621..2cf7375d4d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl
@@ -1,5 +1,5 @@
/**
- * @file sunLightF.glsl
+ * @file sunLightV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
@@ -25,8 +25,6 @@
attribute vec3 position;
-
-varying vec4 vary_light;
varying vec2 vary_fragcoord;
uniform vec2 screen_res;