aboutsummaryrefslogtreecommitdiff
path: root/system/shaders/convolution-6x6.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'system/shaders/convolution-6x6.glsl')
-rw-r--r--system/shaders/convolution-6x6.glsl8
1 files changed, 2 insertions, 6 deletions
diff --git a/system/shaders/convolution-6x6.glsl b/system/shaders/convolution-6x6.glsl
index b440974f70..f791004490 100644
--- a/system/shaders/convolution-6x6.glsl
+++ b/system/shaders/convolution-6x6.glsl
@@ -1,4 +1,5 @@
uniform sampler2D img;
+uniform sampler1D kernelTex;
uniform float stepx;
uniform float stepy;
uniform float m_stretch;
@@ -12,19 +13,14 @@ uniform float m_stretch;
#endif
#if (HAS_FLOAT_TEXTURE)
-uniform sampler1D kernelTex;
-
half3 weight(float pos)
{
return texture1D(kernelTex, pos).rgb;
}
#else
-uniform sampler2D kernelTex;
-
half3 weight(float pos)
{
- //row 0 contains the high byte, row 1 contains the low byte
- return ((texture2D(kernelTex, vec2(pos, 0.0)) * 256.0 + texture2D(kernelTex, vec2(pos, 1.0)))).rgb / 128.5 - 1.0;
+ return texture1D(kernelTex, pos).rgb * 2.0 - 1.0;
}
#endif