diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/shaders/convolution-4x4.glsl | 13 | ||||
-rw-r--r-- | system/shaders/convolution-6x6.glsl | 15 |
2 files changed, 27 insertions, 1 deletions
diff --git a/system/shaders/convolution-4x4.glsl b/system/shaders/convolution-4x4.glsl index d41b127294..6413cd6819 100644 --- a/system/shaders/convolution-4x4.glsl +++ b/system/shaders/convolution-4x4.glsl @@ -18,11 +18,19 @@ * */ +#ifdef GL_ES + precision highp float; +#endif + uniform sampler2D img; uniform vec2 stepxy; uniform float m_stretch; varying vec2 cord; +#ifdef GL_ES + uniform float m_alpha; +#endif + #if (USE1DTEXTURE) uniform sampler1D kernelTex; #else @@ -103,7 +111,12 @@ vec4 process() line(xystart.y + stepxy.y * 2.0, xpos, linetaps) * columntaps.b + line(xystart.y + stepxy.y * 3.0, xpos, linetaps) * columntaps.a; +#ifdef GL_ES + rgb.a = m_alpha; +#else rgb.a = gl_Color.a; +#endif + return rgb; } diff --git a/system/shaders/convolution-6x6.glsl b/system/shaders/convolution-6x6.glsl index 7c568c16ec..fed2332801 100644 --- a/system/shaders/convolution-6x6.glsl +++ b/system/shaders/convolution-6x6.glsl @@ -18,11 +18,19 @@ * */ +#ifdef GL_ES + precision highp float; +#endif + uniform sampler2D img; uniform vec2 stepxy; uniform float m_stretch; varying vec2 cord; +#ifdef GL_ES + uniform float m_alpha; +#endif + #if (USE1DTEXTURE) uniform sampler1D kernelTex; #else @@ -80,7 +88,7 @@ half3 line (float ypos, vec3 xpos1, vec3 xpos2, half3 linetaps1, half3 linetaps2 pixel(xpos1.b, ypos) * linetaps1.g + pixel(xpos2.r, ypos) * linetaps2.g + pixel(xpos2.g, ypos) * linetaps1.b + - pixel(xpos2.b, ypos) * linetaps2.b; + pixel(xpos2.b, ypos) * linetaps2.b; } vec4 process() @@ -114,7 +122,12 @@ vec4 process() line(xystart.y + stepxy.y * 4.0, xpos1, xpos2, linetaps1, linetaps2) * columntaps1.b + line(xystart.y + stepxy.y * 5.0, xpos1, xpos2, linetaps1, linetaps2) * columntaps2.b; +#ifdef GL_ES + rgb.a = m_alpha; +#else rgb.a = gl_Color.a; +#endif + return rgb; } |