diff options
author | Dave Parks <davep@lindenlab.com> | 2010-05-11 00:57:30 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-05-11 00:57:30 -0500 |
commit | b0e471af03bca5d5db6d82cb86ea3424d2cab7fd (patch) | |
tree | c2a79fa73539f27e203c9253d00dab265d12c461 /indra | |
parent | 12d3ba4baee93bcb024fbeee0d6f05df6d02935f (diff) |
EXT-7225 Fix for busted projector shadows under certain settings.
(transplanted from 63218c79aa5670331235d3fde25de4a595991460)
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index dee0138729..66a3fd9f43 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6603,7 +6603,7 @@ <key>Type</key> <string>F32</string> <key>Value</key> - <real>0.01</real> + <real>-0.01</real> </map> <key>RenderShadowResolutionScale</key> diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl index 195a20e9dd..70e241b53a 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl @@ -77,6 +77,7 @@ float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl) float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl) { + stc.z += spot_shadow_offset; stc.xyz /= stc.w; stc.z += spot_shadow_bias*scl; @@ -182,7 +183,7 @@ void main() gl_FragColor[0] = shadow; gl_FragColor[1] = 1.0; - spos.xyz = shadow_pos+offset*spot_shadow_offset; + spos = vec4(shadow_pos, 1.0); //spotlight shadow 1 vec4 lpos = shadow_matrix[4]*spos; |