diff options
author | Dave Parks <davep@lindenlab.com> | 2012-02-06 18:56:19 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-02-06 18:56:19 -0600 |
commit | 38e0b7de96de02243453eeaf5710b924f68abc7a (patch) | |
tree | 34ec45d563aedc10877e91fa1e157556dc3d5b2e /indra/newview/app_settings | |
parent | ae7d475aebc836203984654912df036a11c365fc (diff) |
SH-2729 Fix for horizontal line of glitching graphics when DoF enabled
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl index 01e3505359..0cf5afc568 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl @@ -37,14 +37,24 @@ uniform vec2 screen_res; uniform float max_cof; uniform float res_scale; +uniform float dof_width; +uniform float dof_height; VARYING vec2 vary_fragcoord; +vec4 dofSample(sampler2DRect tex, vec2 tc) +{ + tc.x = min(tc.x, dof_width); + tc.y = min(tc.y, dof_height); + + return texture2DRect(tex, tc); +} + void main() { vec2 tc = vary_fragcoord.xy; - vec4 dof = texture2DRect(diffuseRect, vary_fragcoord.xy*res_scale); + vec4 dof = dofSample(diffuseRect, vary_fragcoord.xy*res_scale); vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy); |