aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGL.cpp4
-rw-r--r--xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGLES.cpp3
6 files changed, 6 insertions, 9 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;
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGL.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGL.cpp
index f800997ffe..70aa734537 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGL.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGL.cpp
@@ -84,9 +84,7 @@ ConvolutionFilterShader::ConvolutionFilterShader(ESCALINGMETHOD method, bool str
}
if (m_floattex)
- defines = "#define HAS_FLOAT_TEXTURE 1\n";
- else
- defines = "#define HAS_FLOAT_TEXTURE 0\n";
+ defines = "#define HAS_FLOAT_TEXTURE\n";
//don't compile in stretch support when it's not needed
if (stretch)
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGLES.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGLES.cpp
index ce1885042f..a9aa0d6f8e 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGLES.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/VideoFilterShaderGLES.cpp
@@ -99,12 +99,11 @@ ConvolutionFilterShader::ConvolutionFilterShader(ESCALINGMETHOD method)
if (m_floattex)
{
m_internalformat = GL_RGBA16F_EXT;
- defines = "#define HAS_FLOAT_TEXTURE 1\n";
+ defines = "#define HAS_FLOAT_TEXTURE\n";
}
else
{
m_internalformat = GL_RGBA;
- defines = "#define HAS_FLOAT_TEXTURE 0\n";
}
CLog::Log(LOGDEBUG, "GL: ConvolutionFilterShader: using %s defines:\n%s", shadername.c_str(), defines.c_str());