summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/interface
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-11-20 21:37:53 -0700
committerXiaohong Bao <bao@lindenlab.com>2012-11-20 21:37:53 -0700
commitced00c47328f69a5426e6c69dce59c8f29856c51 (patch)
tree0718cf047b26081be986a595526bae297804fbf1 /indra/newview/app_settings/shaders/class1/interface
parent551411247b8e4701e4768f61717b644750af83a7 (diff)
more for SH-3352: Create pixel shader to accumulate frame-to-frame absolute pixel differences
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface')
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl13
1 files changed, 13 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 ec5f18e9bd..92aa7602a4 100644
--- a/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/twotexturecompareF.glsl
@@ -38,5 +38,18 @@ VARYING vec2 vary_texcoord1;
void main()
{
frag_color = texture2D(tex0, vary_texcoord0.xy) - texture2D(tex1, vary_texcoord0.xy);
+
+ if(frag_color[0] < 0.f)
+ {
+ frag_color[0] = -frag_color[0];
+ }
+ if(frag_color[1] < 0.f)
+ {
+ frag_color[1] = -frag_color[1];
+ }
+ if(frag_color[2] < 0.f)
+ {
+ frag_color[2] = -frag_color[2];
+ }
frag_color[3] = 1.f;
}