From ced00c47328f69a5426e6c69dce59c8f29856c51 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 20 Nov 2012 21:37:53 -0700 Subject: more for SH-3352: Create pixel shader to accumulate frame-to-frame absolute pixel differences --- .../shaders/class1/interface/twotexturecompareF.glsl | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; } -- cgit v1.2.3