aboutsummaryrefslogtreecommitdiff
path: root/system/shaders
diff options
context:
space:
mode:
authorbobo1on1 <bobo1on1@svn>2010-01-17 20:45:50 +0000
committerbobo1on1 <bobo1on1@svn>2010-01-17 20:45:50 +0000
commitba2c6a258e5883b960187f50d0f4b25e9b85229f (patch)
treea59cca9ca4a21eae2347bf09150a6e81c3df9d6d /system/shaders
parent59d93fa9b5998da3b51910a05b5016da225382aa (diff)
fixed: make sure lines are summed to a half3
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26953 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'system/shaders')
-rw-r--r--system/shaders/convolution-4x4.glsl11
-rw-r--r--system/shaders/convolution-6x6.glsl15
2 files changed, 16 insertions, 10 deletions
diff --git a/system/shaders/convolution-4x4.glsl b/system/shaders/convolution-4x4.glsl
index ee5e9f4d08..16d7b078ea 100644
--- a/system/shaders/convolution-4x4.glsl
+++ b/system/shaders/convolution-4x4.glsl
@@ -57,11 +57,14 @@ void main()
( 1.5 - xf) * stepx + gl_TexCoord[0].x,
( 2.5 - xf) * stepx + gl_TexCoord[0].x);
- gl_FragColor.rgb = line((-0.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.r;
- gl_FragColor.rgb += line(( 0.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.g;
- gl_FragColor.rgb += line(( 1.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.b;
- gl_FragColor.rgb += line(( 2.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.a;
+ half3 output;
+ output = line((-0.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.r;
+ output += line(( 0.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.g;
+ output += line(( 1.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.b;
+ output += line(( 2.5 - yf) * stepy + gl_TexCoord[0].y, xpos, linetaps) * columntaps.a;
+
+ gl_FragColor.rgb = output;
gl_FragColor.a = gl_Color.a;
}
diff --git a/system/shaders/convolution-6x6.glsl b/system/shaders/convolution-6x6.glsl
index a98f60b367..914f6fc26e 100644
--- a/system/shaders/convolution-6x6.glsl
+++ b/system/shaders/convolution-6x6.glsl
@@ -64,13 +64,16 @@ void main()
( 2.5 - xf) * stepx + gl_TexCoord[0].x,
( 3.5 - xf) * stepx + gl_TexCoord[0].x);
- gl_FragColor.rgb = line((-1.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.r;
- gl_FragColor.rgb += line((-0.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.r;
- gl_FragColor.rgb += line(( 0.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.g;
- gl_FragColor.rgb += line(( 1.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.g;
- gl_FragColor.rgb += line(( 2.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.b;
- gl_FragColor.rgb += line(( 3.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.b;
+ half3 output;
+ output = line((-1.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.r;
+ output += line((-0.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.r;
+ output += line(( 0.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.g;
+ output += line(( 1.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.g;
+ output += line(( 2.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.b;
+ output += line(( 3.5 - yf) * stepy + gl_TexCoord[0].y, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.b;
+
+ gl_FragColor.rgb = output;
gl_FragColor.a = gl_Color.a;
}