aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2018-05-25 01:15:13 -0700
committerRainer Hochecker <fernetmenta@online.de>2018-05-25 10:22:08 +0200
commit1ba4b5d3e1825cf5b0d22e96e5dc877da32ed325 (patch)
tree29b2d9452da002021846b46d774c6c9d737968df /system
parent7462ec309ebfab6534ea8f8da698de39c8555c9e (diff)
OpenGLES: fix limited range for gui
Diffstat (limited to 'system')
-rw-r--r--system/shaders/GLES/2.0/gles_shader_multi.frag4
-rw-r--r--system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag4
-rw-r--r--system/shaders/GLES/2.0/gles_shader_texture.frag4
-rw-r--r--system/shaders/GLES/2.0/gles_shader_texture_noblend.frag4
4 files changed, 16 insertions, 0 deletions
diff --git a/system/shaders/GLES/2.0/gles_shader_multi.frag b/system/shaders/GLES/2.0/gles_shader_multi.frag
index 49202d2848..7f76358124 100644
--- a/system/shaders/GLES/2.0/gles_shader_multi.frag
+++ b/system/shaders/GLES/2.0/gles_shader_multi.frag
@@ -30,4 +30,8 @@ varying vec4 m_cord1;
void main ()
{
gl_FragColor.rgba = (texture2D(m_samp0, m_cord0.xy) * texture2D(m_samp1, m_cord1.xy)).rgba;
+#if defined(KODI_LIMITED_RANGE)
+ gl_FragColor.rgb *= (235.0-16.0) / 255.0;
+ gl_FragColor.rgb += 16.0 / 255.0;
+#endif
}
diff --git a/system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag b/system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag
index c01ecd29e7..062f292f28 100644
--- a/system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag
+++ b/system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag
@@ -31,4 +31,8 @@ uniform lowp vec4 m_unicol;
void main ()
{
gl_FragColor.rgba = m_unicol * texture2D(m_samp0, m_cord0.xy) * texture2D(m_samp1, m_cord1.xy);
+#if defined(KODI_LIMITED_RANGE)
+ gl_FragColor.rgb *= (235.0-16.0) / 255.0;
+ gl_FragColor.rgb += 16.0 / 255.0;
+#endif
}
diff --git a/system/shaders/GLES/2.0/gles_shader_texture.frag b/system/shaders/GLES/2.0/gles_shader_texture.frag
index 82b60d9a02..e664330ffd 100644
--- a/system/shaders/GLES/2.0/gles_shader_texture.frag
+++ b/system/shaders/GLES/2.0/gles_shader_texture.frag
@@ -29,4 +29,8 @@ varying vec4 m_cord0;
void main ()
{
gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).rgba * m_unicol);
+#if defined(KODI_LIMITED_RANGE)
+ gl_FragColor.rgb *= (235.0-16.0) / 255.0;
+ gl_FragColor.rgb += 16.0 / 255.0;
+#endif
}
diff --git a/system/shaders/GLES/2.0/gles_shader_texture_noblend.frag b/system/shaders/GLES/2.0/gles_shader_texture_noblend.frag
index 7072a167f0..1752c4cc03 100644
--- a/system/shaders/GLES/2.0/gles_shader_texture_noblend.frag
+++ b/system/shaders/GLES/2.0/gles_shader_texture_noblend.frag
@@ -28,4 +28,8 @@ varying vec4 m_cord0;
void main ()
{
gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).rgba);
+#if defined(KODI_LIMITED_RANGE)
+ gl_FragColor.rgb *= (235.0-16.0) / 255.0;
+ gl_FragColor.rgb += 16.0 / 255.0;
+#endif
}