diff options
author | Richard Linden <none@none> | 2013-01-25 16:18:27 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-01-25 16:18:27 -0800 |
commit | 1e39461e7bab716232366f8454793e4a5216fb13 (patch) | |
tree | f7d8963894b8eb76e8f1a2ff20a01645b27ecc04 /indra/newview/app_settings | |
parent | 09ee16c61d372c1eb620bc3ef3dbfeb798c0a82e (diff) | |
parent | 5ee3071e85de80cd37cc95c51dee5c497957ff9f (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting-metrics
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl index 050114b37e..6eeb2596b2 100644 --- a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl @@ -31,6 +31,10 @@ out vec4 frag_color; uniform sampler2D tex0; uniform sampler2D tex1; +uniform sampler2D dither_tex; +uniform float dither_scale; +uniform float dither_scale_s; +uniform float dither_scale_t; VARYING vec2 vary_texcoord0; VARYING vec2 vary_texcoord1; @@ -38,4 +42,17 @@ VARYING vec2 vary_texcoord1; void main() { frag_color = abs(texture2D(tex0, vary_texcoord0.xy) - texture2D(tex1, vary_texcoord0.xy)); + + vec2 dither_coord; + dither_coord[0] = vary_texcoord0[0] * dither_scale_s; + dither_coord[1] = vary_texcoord0[1] * dither_scale_t; + vec4 dither_vec = texture(dither_tex, dither_coord.xy); + + for(int i = 0; i < 3; i++) + { + if(frag_color[i] < dither_vec[i] * dither_scale) + { + frag_color[i] = 0.f; + } + } } |