aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/shaders/convolution-4x4.glsl3
-rw-r--r--system/shaders/convolution-6x6.glsl3
-rw-r--r--system/shaders/stretch.glsl3
-rw-r--r--xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp5
4 files changed, 9 insertions, 5 deletions
diff --git a/system/shaders/convolution-4x4.glsl b/system/shaders/convolution-4x4.glsl
index 0de050f107..8530a55bca 100644
--- a/system/shaders/convolution-4x4.glsl
+++ b/system/shaders/convolution-4x4.glsl
@@ -1,6 +1,7 @@
uniform sampler2D img;
uniform vec2 stepxy;
uniform float m_stretch;
+varying vec2 cord;
#if (USE1DTEXTURE)
uniform sampler1D kernelTex;
@@ -62,7 +63,7 @@ half3 line (float ypos, vec4 xpos, half4 linetaps)
void main()
{
- vec2 pos = stretch(gl_TexCoord[0].xy) + stepxy * 0.5;
+ vec2 pos = stretch(cord) + stepxy * 0.5;
vec2 f = fract(pos / stepxy);
half4 linetaps = weight(1.0 - f.x);
diff --git a/system/shaders/convolution-6x6.glsl b/system/shaders/convolution-6x6.glsl
index 255a574686..f2b619dacd 100644
--- a/system/shaders/convolution-6x6.glsl
+++ b/system/shaders/convolution-6x6.glsl
@@ -1,6 +1,7 @@
uniform sampler2D img;
uniform vec2 stepxy;
uniform float m_stretch;
+varying vec2 cord;
#if (USE1DTEXTURE)
uniform sampler1D kernelTex;
@@ -64,7 +65,7 @@ half3 line (float ypos, vec3 xpos1, vec3 xpos2, half3 linetaps1, half3 linetaps2
void main()
{
- vec2 pos = stretch(gl_TexCoord[0].xy) + stepxy * 0.5;
+ vec2 pos = stretch(cord) + stepxy * 0.5;
vec2 f = fract(pos / stepxy);
half3 linetaps1 = weight((1.0 - f.x) / 2.0);
diff --git a/system/shaders/stretch.glsl b/system/shaders/stretch.glsl
index ac7ddd9783..8e268837a9 100644
--- a/system/shaders/stretch.glsl
+++ b/system/shaders/stretch.glsl
@@ -1,5 +1,6 @@
uniform sampler2D img;
uniform float m_stretch;
+varying vec2 cord;
vec2 stretch(vec2 pos)
{
@@ -12,7 +13,7 @@ vec2 stretch(vec2 pos)
void main()
{
- gl_FragColor.rgb = texture2D(img, stretch(gl_TexCoord[0].xy)).rgb;
+ gl_FragColor.rgb = texture2D(img, stretch(cord)).rgb;
gl_FragColor.a = gl_Color.a;
}
diff --git a/xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp b/xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp
index 1bbf8cae99..ada257a062 100644
--- a/xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp
+++ b/xbmc/cores/VideoRenderers/VideoShaders/VideoFilterShader.cpp
@@ -54,10 +54,11 @@ BaseVideoFilterShader::BaseVideoFilterShader()
m_stretch = 0.0f;
- string shaderv =
+ string shaderv =
+ "varying vec2 cord;"
"void main()"
"{"
- "gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;"
+ "cord = vec2(gl_TextureMatrix[0] * gl_MultiTexCoord0);"
"gl_Position = ftransform();"
"gl_FrontColor = gl_Color;"
"}";