From e7003b5bef3c64e84b0656abff70be8c1f08729a Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 7 Sep 2017 18:45:08 -0700 Subject: LinuxRendererGLES: implement hq scalers --- system/shaders/convolution-4x4.glsl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'system/shaders/convolution-4x4.glsl') 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; } -- cgit v1.2.3