aboutsummaryrefslogtreecommitdiff
path: root/system/shaders
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2016-04-28 15:01:26 +0200
committerRainer Hochecker <fernetmenta@online.de>2016-04-28 17:59:00 +0200
commit9d8b5659a904a6720190e50ae9296bfaf4075220 (patch)
tree2eb9248967df688ec54eec149b145ad7a1d7116a /system/shaders
parent04a9d164dd76d1a3f11e561559cb7a49f86bef40 (diff)
VideoPlayer: fix GLSL on OSX, clamp not supported in version 1.2
Diffstat (limited to 'system/shaders')
-rw-r--r--system/shaders/output.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/system/shaders/output.glsl b/system/shaders/output.glsl
index ecaa30d9da..c95c9488f2 100644
--- a/system/shaders/output.glsl
+++ b/system/shaders/output.glsl
@@ -9,8 +9,12 @@ void main()
vec4 rgb = process();
#if defined(XBMC_FULLRANGE)
+#if __VERSION__ <= 120
+ rgb = (rgb-(16.0/255.0)) * 255.0/219.0;
+#else
rgb = clamp((rgb-(16.0/255.0)) * 255.0/219.0, 0, 1);
#endif
+#endif
#if defined(XBMC_DITHER)
vec2 ditherpos = gl_FragCoord.xy / m_dithersize;