diff options
author | bobo1on1 <bobo1on1@svn> | 2010-06-30 23:23:08 +0000 |
---|---|---|
committer | bobo1on1 <bobo1on1@svn> | 2010-06-30 23:23:08 +0000 |
commit | 28dbad3d65261f43a782218b8ac301776825830f (patch) | |
tree | 3923236e38d435485966e01db992301ced6fef39 /system | |
parent | a793b624b4867daeadf583487bcc3318c8f35893 (diff) |
refactor usage of stepxy in videofiltershader
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31534 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'system')
-rw-r--r-- | system/shaders/convolution-4x4.glsl | 4 | ||||
-rw-r--r-- | system/shaders/convolution-6x6.glsl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/system/shaders/convolution-4x4.glsl b/system/shaders/convolution-4x4.glsl index c02578f874..0de050f107 100644 --- a/system/shaders/convolution-4x4.glsl +++ b/system/shaders/convolution-4x4.glsl @@ -62,7 +62,7 @@ half3 line (float ypos, vec4 xpos, half4 linetaps) void main() { - vec2 pos = stretch(gl_TexCoord[0].xy); + vec2 pos = stretch(gl_TexCoord[0].xy) + stepxy * 0.5; vec2 f = fract(pos / stepxy); half4 linetaps = weight(1.0 - f.x); @@ -72,7 +72,7 @@ void main() linetaps /= linetaps.r + linetaps.g + linetaps.b + linetaps.a; columntaps /= columntaps.r + columntaps.g + columntaps.b + columntaps.a; - vec2 xystart = (-0.5 - f) * stepxy + pos; + vec2 xystart = (-1.5 - f) * stepxy + pos; vec4 xpos = vec4(xystart.x, xystart.x + stepxy.x, xystart.x + stepxy.x * 2.0, xystart.x + stepxy.x * 3.0); gl_FragColor.rgb = diff --git a/system/shaders/convolution-6x6.glsl b/system/shaders/convolution-6x6.glsl index a455076e0b..255a574686 100644 --- a/system/shaders/convolution-6x6.glsl +++ b/system/shaders/convolution-6x6.glsl @@ -64,7 +64,7 @@ half3 line (float ypos, vec3 xpos1, vec3 xpos2, half3 linetaps1, half3 linetaps2 void main() { - vec2 pos = stretch(gl_TexCoord[0].xy); + vec2 pos = stretch(gl_TexCoord[0].xy) + stepxy * 0.5; vec2 f = fract(pos / stepxy); half3 linetaps1 = weight((1.0 - f.x) / 2.0); @@ -80,7 +80,7 @@ void main() columntaps1 /= sum; columntaps2 /= sum; - vec2 xystart = (-1.5 - f) * stepxy + pos; + vec2 xystart = (-2.5 - f) * stepxy + pos; vec3 xpos1 = vec3(xystart.x, xystart.x + stepxy.x, xystart.x + stepxy.x * 2.0); vec3 xpos2 = vec3(xystart.x + stepxy.x * 3.0, xystart.x + stepxy.x * 4.0, xystart.x + stepxy.x * 5.0); |