diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2019-07-31 00:10:08 -0700 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2019-10-30 13:55:10 -0700 |
commit | 0ce81fc5168f52775146b01416123f3364b42603 (patch) | |
tree | 2058800ec11fca025a1c444e264111c58d34aebb /system/shaders/GLES/2.0 | |
parent | 79364eece7d86b47cd6804b9d8b0ea4834878cae (diff) |
CRenderSystemGLES: Add no-alpha texture shader
Diffstat (limited to 'system/shaders/GLES/2.0')
-rw-r--r-- | system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag b/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag new file mode 100644 index 0000000000..9f478ed3da --- /dev/null +++ b/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2019 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#version 100 + +precision mediump float; +uniform sampler2D m_samp0; +varying vec4 m_cord0; + +void main () +{ + vec3 rgb = texture2D(m_samp0, m_cord0.xy).rgb; + +#if defined(KODI_LIMITED_RANGE) + rgb *= (235.0 - 16.0) / 255.0; + rgb += 16.0 / 255.0; +#endif + + gl_FragColor = vec4(rgb, 1.0); +} |