aboutsummaryrefslogtreecommitdiff
path: root/system/shaders/GL
diff options
context:
space:
mode:
authorkszaq <kszaquitto@gmail.com>2019-04-17 22:21:15 +0200
committerkszaq <kszaquitto@gmail.com>2019-04-17 22:42:14 +0200
commite61efc651beb1251648a3213d5d693cbad62458a (patch)
treeaba7e262fbc019a96c43abc1a9abb90e36501576 /system/shaders/GL
parent018c68af0db60fc0939c111234298f22e14a2892 (diff)
GL: fix HAS_FLOAT_TEXTURE usage
In GLES shaders 'if defined(HAS_FLOAT_TEXTURE)' was always true as HAS_FLOAT_TEXTURE was always defined. Fix this by not defining HAS_FLOAT_TEXTURE when target does not support it and amend GL shaders to follow this behaviour.
Diffstat (limited to 'system/shaders/GL')
-rw-r--r--system/shaders/GL/1.2/gl_convolution-4x4.glsl2
-rw-r--r--system/shaders/GL/1.2/gl_convolution-6x6.glsl2
-rw-r--r--system/shaders/GL/1.5/gl_convolution-4x4.glsl2
-rw-r--r--system/shaders/GL/1.5/gl_convolution-6x6.glsl2
4 files changed, 4 insertions, 4 deletions
diff --git a/system/shaders/GL/1.2/gl_convolution-4x4.glsl b/system/shaders/GL/1.2/gl_convolution-4x4.glsl
index 0f580fea41..32d955d8fb 100644
--- a/system/shaders/GL/1.2/gl_convolution-4x4.glsl
+++ b/system/shaders/GL/1.2/gl_convolution-4x4.glsl
@@ -35,7 +35,7 @@ uniform sampler1D kernelTex;
half4 weight(float pos)
{
-#if (HAS_FLOAT_TEXTURE)
+#if defined(HAS_FLOAT_TEXTURE)
return texture1D(kernelTex, pos);
#else
return texture1D(kernelTex, pos) * 2.0 - 1.0;
diff --git a/system/shaders/GL/1.2/gl_convolution-6x6.glsl b/system/shaders/GL/1.2/gl_convolution-6x6.glsl
index 057d6dfed8..01328a0c11 100644
--- a/system/shaders/GL/1.2/gl_convolution-6x6.glsl
+++ b/system/shaders/GL/1.2/gl_convolution-6x6.glsl
@@ -35,7 +35,7 @@ uniform sampler1D kernelTex;
half3 weight(float pos)
{
-#if (HAS_FLOAT_TEXTURE)
+#if defined(HAS_FLOAT_TEXTURE)
return texture1D(kernelTex, pos).rgb;
#else
return texture1D(kernelTex, pos).rgb * 2.0 - 1.0;
diff --git a/system/shaders/GL/1.5/gl_convolution-4x4.glsl b/system/shaders/GL/1.5/gl_convolution-4x4.glsl
index 84e92c6967..144676ee27 100644
--- a/system/shaders/GL/1.5/gl_convolution-4x4.glsl
+++ b/system/shaders/GL/1.5/gl_convolution-4x4.glsl
@@ -18,7 +18,7 @@ uniform sampler1D kernelTex;
half4 weight(float pos)
{
-#if (HAS_FLOAT_TEXTURE)
+#if defined(HAS_FLOAT_TEXTURE)
return texture(kernelTex, pos);
#else
return texture(kernelTex, pos) * 2.0 - 1.0;
diff --git a/system/shaders/GL/1.5/gl_convolution-6x6.glsl b/system/shaders/GL/1.5/gl_convolution-6x6.glsl
index 950192d496..4af3744ae1 100644
--- a/system/shaders/GL/1.5/gl_convolution-6x6.glsl
+++ b/system/shaders/GL/1.5/gl_convolution-6x6.glsl
@@ -18,7 +18,7 @@ uniform sampler1D kernelTex;
half3 weight(float pos)
{
-#if (HAS_FLOAT_TEXTURE)
+#if defined(HAS_FLOAT_TEXTURE)
return texture(kernelTex, pos).rgb;
#else
return texture(kernelTex, pos).rgb * 2.0 - 1.0;