diff options
Diffstat (limited to 'system')
30 files changed, 326 insertions, 60 deletions
diff --git a/system/addon-manifest.xml b/system/addon-manifest.xml index 7df13a6d6f..8c87ebe871 100644 --- a/system/addon-manifest.xml +++ b/system/addon-manifest.xml @@ -43,7 +43,6 @@ <addon>screensaver.xbmc.builtin.dim</addon> <addon>script.module.pil</addon> <addon>script.module.pycryptodome</addon> - <addon>skin.estouchy</addon> <addon>skin.estuary</addon> <addon>webinterface.default</addon> <addon>xbmc.addon</addon> diff --git a/system/keyboardlayouts/persian.xml b/system/keyboardlayouts/persian.xml index e92f5878f9..a7edea52a1 100644 --- a/system/keyboardlayouts/persian.xml +++ b/system/keyboardlayouts/persian.xml @@ -15,7 +15,7 @@ Default font lacks support for all characters <row>1234567890</row> <row>\|{}ّ[]</row> <row>؛:«»ةآأإيئؤ</row> - <row>/<>؟ٰك</row> + <row>/<>؟ٰك</row> </keyboard> <keyboard modifiers="symbol,shift+symbol"> <row>)!@#$%^&*(</row> diff --git a/system/keymaps/joystick.xml b/system/keymaps/joystick.xml index 2db760b4c0..8097e32c4d 100644 --- a/system/keymaps/joystick.xml +++ b/system/keymaps/joystick.xml @@ -28,14 +28,29 @@ <!-- <a holdtime="500">ContextMenu</a> --> <!-- </joystick> --> <!-- --> -<!-- Buttons can be also require hotkeys to be pressed: --> +<!-- Buttons can be overloaded with hotkeys: --> <!-- <joystick profile="game.controller.default"> --> -<!-- <start hotkey="back">Stop</start> --> +<!-- <a>Select</a> --> +<!-- <a hotkey="back">ContextMenu</a> --> +<!-- </joystick> --> +<!-- --> +<!-- It is even possible to combine both hotkeys and hold durations: --> +<!-- <joystick profile="game.controller.default"> --> +<!-- <a>Select</a> --> +<!-- <a hotkey="back">ContextMenu</a> --> +<!-- <a hotkey="back" holdtime="500">Stop</a> --> +<!-- </joystick> --> +<!-- --> +<!-- Both hold duration and hotkeys can be the only stand alone variant of --> +<!-- an action: --> +<!-- <joystick profile="game.controller.default"> --> +<!-- <a hotkey="back">ContextMenu</a> --> +<!-- <b holdtime="500">Stop</b> --> <!-- </joystick> --> <!-- --> -<!-- Due to limitations in the button mapper, buttons can be overloaded with --> -<!-- different hold durations, but not different hotkeys for the same --> -<!-- duration. --> +<!-- A limitation is that if a single press is mapped in a section, a --> +<!-- global "holdtime" overload will be ignored. The workaround is to --> +<!-- duplicate the holdtime overload in the section. --> <!-- --> <!-- More documentation on keymaps can be found on --> <!-- http://kodi.wiki/view/keymaps --> diff --git a/system/keymaps/remote.xml b/system/keymaps/remote.xml index 10f802d035..5c0baf7e9d 100644 --- a/system/keymaps/remote.xml +++ b/system/keymaps/remote.xml @@ -50,7 +50,7 @@ <volumeplus>VolumeUp</volumeplus> <volumeminus>VolumeDown</volumeminus> <mute>Mute</mute> - <power>ActivateWindow(ShutdownMenu)</power> + <power>ShutDown()</power> <myvideo>ActivateWindow(Videos)</myvideo> <mymusic>ActivateWindow(Music)</mymusic> <mypictures>ActivateWindow(Pictures)</mypictures> diff --git a/system/settings/android.xml b/system/settings/android.xml index 661a978e32..838990389a 100644 --- a/system/settings/android.xml +++ b/system/settings/android.xml @@ -29,16 +29,4 @@ </group> </category> </section> - <section id="interface"> - <category id="regional"> - <group id="2"> - <setting id="locale.timezonecountry"> - <visible>false</visible> - </setting> - <setting id="locale.timezone"> - <visible>false</visible> - </setting> - </group> - </category> - </section> </settings> diff --git a/system/settings/darwin_ios.xml b/system/settings/darwin_ios.xml index b94522a999..ab3b8f1a97 100644 --- a/system/settings/darwin_ios.xml +++ b/system/settings/darwin_ios.xml @@ -82,7 +82,7 @@ <category id="skin"> <group id="1"> <setting id="lookandfeel.skin" type="addon"> - <default>skin.estouchy</default> + <default>skin.estuary</default> </setting> </group> </category> diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 55877e7398..0f559176be 100755 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -193,16 +193,45 @@ <control type="toggle" /> </setting> <setting id="videoplayer.convertdovi" type="boolean" label="39196" help="39197"> - <requirement>HAS_MEDIACODEC</requirement> + <requirement><!-- Android and webOS use CBitstreamConverter --> + <or> + <condition>HAS_MEDIACODEC</condition> + <condition>HAVE_WEBOS</condition> + </or> + </requirement> <dependencies> <dependency type="visible"> - <condition on="property" name="supportsdolbyvision" /> + <or> + <condition on="property" name="supportsdolbyvision" /> + <condition>HAVE_WEBOS</condition> + </or> </dependency> </dependencies> <level>2</level> <default>false</default> <control type="toggle" /> </setting> + <setting id="videoplayer.allowedhdrformats" type="list[integer]" label="39198" help="39199"> + <requirement><!-- Android and webOS use CBitstreamConverter --> + <or> + <condition>HAS_MEDIACODEC</condition> + <condition>HAVE_WEBOS</condition> + </or> + </requirement> + <level>2</level> + <default>0,1</default> <!-- Allow all HDR formats --> + <constraints> + <options> + <option label="39200">0</option> <!-- Dolby Vision --> + <option label="39201">1</option> <!-- HDR10+ --> + </options> + <delimiter>,</delimiter> + </constraints> + <control type="list" format="string"> + <multiselect>true</multiselect> + <hidevalue>false</hidevalue> + </control> + </setting> </group> <group id="4" label="14232"> <setting id="videoplayer.stereoscopicplaybackmode" type="integer" label="36520" help="36537"> @@ -2509,7 +2538,7 @@ <group id="1" label="16000"> <setting id="filecache.buffermode" type="integer" label="37103" help="37104"> <level>2</level> - <default>4</default> + <default>4</default> <!-- All network filesystems --> <constraints> <options>filecachebuffermodes</options> </constraints> @@ -2517,7 +2546,7 @@ </setting> <setting id="filecache.memorysize" type="integer" label="37105" help="37106"> <level>2</level> - <default>20</default> + <default>64</default> <!-- 64 MB --> <dependencies> <dependency type="enable"> <condition setting="filecache.buffermode" operator="!is">3</condition> @@ -2530,7 +2559,7 @@ </setting> <setting id="filecache.readfactor" type="integer" label="37107" help="37108"> <level>2</level> - <default>400</default> + <default>0</default> <!-- Adaptive --> <dependencies> <dependency type="enable"> <condition setting="filecache.buffermode" operator="!is">3</condition> @@ -2545,7 +2574,7 @@ <group id="2" label="37053"> <setting id="filecache.chunksize" type="integer" label="37053" help="37109"> <level>2</level> - <default>131072</default> + <default>131072</default> <!-- 128 KB --> <dependencies> <dependency type="enable"> <condition setting="filecache.buffermode" operator="!is">3</condition> @@ -2990,7 +3019,12 @@ <control type="toggle" /> </setting> <setting id="videoscreen.guipeakluminance" type="integer" label="36097" help="36547"> - <requirement>HAS_DX</requirement> + <requirement> + <or> + <condition>HAS_DX</condition> + <condition>HAS_MEDIACODEC</condition> + </or> + </requirement> <dependencies> <dependency type="visible" on="property" name="ishdrdisplay"/> <dependency type="enable"> @@ -4009,25 +4043,6 @@ </dependencies> <control type="list" format="string" /> </setting> - <setting id="locale.timezonecountry" type="string" label="14079" help="36117"> - <level>1</level> - <default>default</default> <!-- will be properly set on startup --> - <constraints> - <options>timezonecountries</options> - </constraints> - <control type="list" format="string" /> - </setting> - <setting id="locale.timezone" type="string" label="14080" help="36118"> - <level>1</level> - <default>default</default> <!-- will be properly set on startup --> - <constraints> - <options>timezones</options> - </constraints> - <dependencies> - <dependency type="update" setting="locale.timezonecountry" /> - </dependencies> - <control type="list" format="string" /> - </setting> <setting id="locale.shortdateformat" type="string" label="14109" help="36173"> <level>2</level> <default>regional</default> diff --git a/system/settings/windows.xml b/system/settings/windows.xml index 163cb5c2d3..523d0c9cab 100644 --- a/system/settings/windows.xml +++ b/system/settings/windows.xml @@ -58,16 +58,4 @@ </group> </category> </section> - <section id="interface"> - <category id="regional"> - <group id="2"> - <setting id="locale.timezonecountry"> - <visible>false</visible> - </setting> - <setting id="locale.timezone"> - <visible>false</visible> - </setting> - </group> - </category> - </section> </settings> diff --git a/system/shaders/GL/1.2/gl_shader_vert.glsl b/system/shaders/GL/1.2/gl_shader_vert.glsl index 7c10b5f1bf..fef2d2d94e 100644 --- a/system/shaders/GL/1.2/gl_shader_vert.glsl +++ b/system/shaders/GL/1.2/gl_shader_vert.glsl @@ -29,11 +29,13 @@ varying vec4 m_cord1; varying vec4 m_colour; uniform mat4 m_proj; uniform mat4 m_model; +uniform float m_depth; void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = m_depth * gl_Position.w; m_colour = m_attrcol; m_cord0 = m_attrcord0; m_cord1 = m_attrcord1; diff --git a/system/shaders/GL/1.2/gl_shader_vert_clip.glsl b/system/shaders/GL/1.2/gl_shader_vert_clip.glsl new file mode 100644 index 0000000000..959f8ad46b --- /dev/null +++ b/system/shaders/GL/1.2/gl_shader_vert_clip.glsl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 120 + +attribute vec4 m_attrpos; +attribute vec4 m_attrcol; +attribute vec4 m_attrcord0; +attribute vec4 m_attrcord1; +varying vec4 m_cord0; +varying vec4 m_cord1; +varying vec4 m_colour; +uniform mat4 m_matrix; +uniform vec4 m_shaderClip; +uniform vec4 m_cordStep; +uniform float m_depth; + +// this shader can be used in cases where clipping via glScissor() is not +// possible (e.g. when rotating). it can't discard triangles, but it may +// degenerate them. + +void main () +{ + // limit the vertices to the clipping area + vec4 position = m_attrpos; + position.xy = clamp(position.xy, m_shaderClip.xy, m_shaderClip.zw); + gl_Position = m_matrix * position; + + // set rendering depth + gl_Position.z = m_depth * gl_Position.w; + + // correct texture coordinates for clipped vertices + vec2 clipDist = m_attrpos.xy - position.xy; + m_cord0.xy = m_attrcord0.xy - clipDist * m_cordStep.xy; + m_cord1.xy = m_attrcord1.xy - clipDist * m_cordStep.zw; + + m_colour = m_attrcol; +} diff --git a/system/shaders/GL/1.2/gl_shader_vert_default.glsl b/system/shaders/GL/1.2/gl_shader_vert_default.glsl index 554e15c3fd..bbb06cb5fe 100644 --- a/system/shaders/GL/1.2/gl_shader_vert_default.glsl +++ b/system/shaders/GL/1.2/gl_shader_vert_default.glsl @@ -28,4 +28,5 @@ void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = -1. * gl_Position.w; } diff --git a/system/shaders/GL/1.2/gl_shader_vert_simple.glsl b/system/shaders/GL/1.2/gl_shader_vert_simple.glsl new file mode 100644 index 0000000000..91fbae0b75 --- /dev/null +++ b/system/shaders/GL/1.2/gl_shader_vert_simple.glsl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2024 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 120 + +attribute vec4 m_attrpos; +attribute vec4 m_attrcol; +attribute vec4 m_attrcord0; +attribute vec4 m_attrcord1; +varying vec4 m_cord0; +varying vec4 m_cord1; +varying vec4 m_colour; +uniform mat4 m_matrix; +uniform float m_depth; + +void main () +{ + gl_Position = m_matrix * m_attrpos; + gl_Position.z = m_depth * gl_Position.w; + m_colour = m_attrcol; + m_cord0 = m_attrcord0; + m_cord1 = m_attrcord1; +} diff --git a/system/shaders/GL/1.2/gl_yuv2rgb_vertex.glsl b/system/shaders/GL/1.2/gl_yuv2rgb_vertex.glsl index cdf3c56a71..8d7e0c3530 100644 --- a/system/shaders/GL/1.2/gl_yuv2rgb_vertex.glsl +++ b/system/shaders/GL/1.2/gl_yuv2rgb_vertex.glsl @@ -32,6 +32,7 @@ void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = -1. * gl_Position.w; m_cordY = m_attrcordY; m_cordU = m_attrcordU; m_cordV = m_attrcordV; diff --git a/system/shaders/GL/1.5/gl_shader_vert.glsl b/system/shaders/GL/1.5/gl_shader_vert.glsl index a8568310c2..c66c804788 100644 --- a/system/shaders/GL/1.5/gl_shader_vert.glsl +++ b/system/shaders/GL/1.5/gl_shader_vert.glsl @@ -9,11 +9,13 @@ out vec4 m_cord1; out vec4 m_colour; uniform mat4 m_proj; uniform mat4 m_model; +uniform float m_depth; void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = m_depth * gl_Position.w; m_colour = m_attrcol; m_cord0 = m_attrcord0; m_cord1 = m_attrcord1; diff --git a/system/shaders/GL/1.5/gl_shader_vert_clip.glsl b/system/shaders/GL/1.5/gl_shader_vert_clip.glsl new file mode 100644 index 0000000000..0cb2a8f1d8 --- /dev/null +++ b/system/shaders/GL/1.5/gl_shader_vert_clip.glsl @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 150 + +in vec4 m_attrpos; +in vec4 m_attrcol; +in vec4 m_attrcord0; +in vec4 m_attrcord1; +out vec4 m_cord0; +out vec4 m_cord1; +out vec4 m_colour; +uniform mat4 m_matrix; +uniform vec4 m_shaderClip; +uniform vec4 m_cordStep; +uniform float m_depth; + +// this shader can be used in cases where clipping via glScissor() is not +// possible (e.g. when rotating). it can't discard triangles, but it may +// degenerate them. + +void main () +{ + // limit the vertices to the clipping area + vec4 position = m_attrpos; + position.xy = clamp(position.xy, m_shaderClip.xy, m_shaderClip.zw); + gl_Position = m_matrix * position; + + // set rendering depth + gl_Position.z = m_depth * gl_Position.w; + + // correct texture coordinates for clipped vertices + vec2 clipDist = m_attrpos.xy - position.xy; + m_cord0.xy = m_attrcord0.xy - clipDist * m_cordStep.xy; + m_cord1.xy = m_attrcord1.xy - clipDist * m_cordStep.zw; + + m_colour = m_attrcol; +} diff --git a/system/shaders/GL/1.5/gl_shader_vert_default.glsl b/system/shaders/GL/1.5/gl_shader_vert_default.glsl index e4f2d7c9ee..b68ef12925 100644 --- a/system/shaders/GL/1.5/gl_shader_vert_default.glsl +++ b/system/shaders/GL/1.5/gl_shader_vert_default.glsl @@ -8,4 +8,5 @@ void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = -1. * gl_Position.w; } diff --git a/system/shaders/GL/1.5/gl_shader_vert_simple.glsl b/system/shaders/GL/1.5/gl_shader_vert_simple.glsl new file mode 100644 index 0000000000..953cdfcf8b --- /dev/null +++ b/system/shaders/GL/1.5/gl_shader_vert_simple.glsl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2024 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 150 + +in vec4 m_attrpos; +in vec4 m_attrcol; +in vec4 m_attrcord0; +in vec4 m_attrcord1; +out vec4 m_cord0; +out vec4 m_cord1; +out vec4 m_colour; +uniform mat4 m_matrix; +uniform float m_depth; + +void main () +{ + gl_Position = m_matrix * m_attrpos; + gl_Position.z = m_depth * gl_Position.w; + m_colour = m_attrcol; + m_cord0 = m_attrcord0; + m_cord1 = m_attrcord1; +} diff --git a/system/shaders/GL/1.5/gl_yuv2rgb_vertex.glsl b/system/shaders/GL/1.5/gl_yuv2rgb_vertex.glsl index 4772bd4172..257aacfcc2 100644 --- a/system/shaders/GL/1.5/gl_yuv2rgb_vertex.glsl +++ b/system/shaders/GL/1.5/gl_yuv2rgb_vertex.glsl @@ -14,6 +14,7 @@ void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = -1. * gl_Position.w; m_cordY = m_attrcordY; m_cordU = m_attrcordU; m_cordV = m_attrcordV; diff --git a/system/shaders/GLES/2.0/gles_shader.vert b/system/shaders/GLES/2.0/gles_shader.vert index 890acbbb81..17b4ad7b48 100644 --- a/system/shaders/GLES/2.0/gles_shader.vert +++ b/system/shaders/GLES/2.0/gles_shader.vert @@ -30,11 +30,13 @@ varying lowp vec4 m_colour; uniform mat4 m_proj; uniform mat4 m_model; uniform mat4 m_coord0Matrix; +uniform float m_depth; void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = m_depth * gl_Position.w; m_colour = m_attrcol; m_cord0 = m_coord0Matrix * m_attrcord0; m_cord1 = m_attrcord1; diff --git a/system/shaders/GLES/2.0/gles_shader_clip.vert b/system/shaders/GLES/2.0/gles_shader_clip.vert new file mode 100644 index 0000000000..1b1cf3f91e --- /dev/null +++ b/system/shaders/GLES/2.0/gles_shader_clip.vert @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 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 + +attribute vec4 m_attrpos; +attribute vec4 m_attrcol; +attribute vec4 m_attrcord0; +attribute vec4 m_attrcord1; +varying vec4 m_cord0; +varying vec4 m_cord1; +varying vec4 m_colour; +uniform mat4 m_matrix; +uniform vec4 m_shaderClip; +uniform vec4 m_cordStep; +uniform float m_depth; + +// this shader can be used in cases where clipping via glScissor() is not +// possible (e.g. when rotating). it can't discard triangles, but it may +// degenerate them. + +void main() +{ + // limit the vertices to the clipping area + vec4 position = m_attrpos; + position.xy = clamp(position.xy, m_shaderClip.xy, m_shaderClip.zw); + gl_Position = m_matrix * position; + + // set rendering depth + gl_Position.z = m_depth * gl_Position.w; + + // correct texture coordinates for clipped vertices + vec2 clipDist = m_attrpos.xy - position.xy; + m_cord0.xy = m_attrcord0.xy - clipDist * m_cordStep.xy; + m_cord1.xy = m_attrcord1.xy - clipDist * m_cordStep.zw; + + m_colour = m_attrcol; +} diff --git a/system/shaders/GLES/2.0/gles_shader_default.frag b/system/shaders/GLES/2.0/gles_shader_default.frag index f213360454..5f0bcd28c4 100644 --- a/system/shaders/GLES/2.0/gles_shader_default.frag +++ b/system/shaders/GLES/2.0/gles_shader_default.frag @@ -22,6 +22,7 @@ precision mediump float; uniform lowp vec4 m_unicol; +uniform float m_sdrPeak; void main () { @@ -34,5 +35,9 @@ void main () rgb.rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = rgb; } diff --git a/system/shaders/GLES/2.0/gles_shader_fonts.frag b/system/shaders/GLES/2.0/gles_shader_fonts.frag index 075d26f67a..a26d28b593 100644 --- a/system/shaders/GLES/2.0/gles_shader_fonts.frag +++ b/system/shaders/GLES/2.0/gles_shader_fonts.frag @@ -24,6 +24,7 @@ precision mediump float; uniform sampler2D m_samp0; varying vec4 m_cord0; varying lowp vec4 m_colour; +uniform float m_sdrPeak; void main () { @@ -37,5 +38,9 @@ void main () rgb.rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = rgb; } diff --git a/system/shaders/GLES/2.0/gles_shader_multi.frag b/system/shaders/GLES/2.0/gles_shader_multi.frag index 9f288982ec..f4c608d150 100644 --- a/system/shaders/GLES/2.0/gles_shader_multi.frag +++ b/system/shaders/GLES/2.0/gles_shader_multi.frag @@ -25,6 +25,7 @@ uniform sampler2D m_samp0; uniform sampler2D m_samp1; varying vec4 m_cord0; varying vec4 m_cord1; +uniform float m_sdrPeak; void main () { @@ -37,5 +38,9 @@ void main () rgb.rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = rgb; } 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 35153da34c..98e5f7e7df 100644 --- a/system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag +++ b/system/shaders/GLES/2.0/gles_shader_multi_blendcolor.frag @@ -26,6 +26,7 @@ uniform sampler2D m_samp1; varying vec4 m_cord0; varying vec4 m_cord1; uniform lowp vec4 m_unicol; +uniform float m_sdrPeak; void main () { @@ -38,5 +39,9 @@ void main () rgb.rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = rgb; } diff --git a/system/shaders/GLES/2.0/gles_shader_simple.vert b/system/shaders/GLES/2.0/gles_shader_simple.vert new file mode 100644 index 0000000000..2f34f8bf28 --- /dev/null +++ b/system/shaders/GLES/2.0/gles_shader_simple.vert @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 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 + +attribute vec4 m_attrpos; +attribute vec4 m_attrcol; +attribute vec4 m_attrcord0; +attribute vec4 m_attrcord1; +varying vec4 m_cord0; +varying vec4 m_cord1; +varying vec4 m_colour; +uniform mat4 m_matrix; +uniform float m_depth; + +void main() +{ + gl_Position = m_matrix * m_attrpos; + + // set rendering depth + gl_Position.z = m_depth * gl_Position.w; + m_colour = m_attrcol; + m_cord0 = m_attrcord0; + m_cord1 = m_attrcord1; +} diff --git a/system/shaders/GLES/2.0/gles_shader_texture.frag b/system/shaders/GLES/2.0/gles_shader_texture.frag index a2ac2de79b..ef1609c7f1 100644 --- a/system/shaders/GLES/2.0/gles_shader_texture.frag +++ b/system/shaders/GLES/2.0/gles_shader_texture.frag @@ -24,6 +24,7 @@ precision mediump float; uniform sampler2D m_samp0; uniform lowp vec4 m_unicol; varying vec4 m_cord0; +uniform float m_sdrPeak; void main () { @@ -36,5 +37,9 @@ void main () rgb.rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = rgb; } diff --git a/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag b/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag index 9f478ed3da..7db591c84e 100644 --- a/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag +++ b/system/shaders/GLES/2.0/gles_shader_texture_noalpha.frag @@ -11,6 +11,7 @@ precision mediump float; uniform sampler2D m_samp0; varying vec4 m_cord0; +uniform float m_sdrPeak; void main () { @@ -21,5 +22,9 @@ void main () rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = vec4(rgb, 1.0); } 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 8cc66c94c9..44d797b539 100644 --- a/system/shaders/GLES/2.0/gles_shader_texture_noblend.frag +++ b/system/shaders/GLES/2.0/gles_shader_texture_noblend.frag @@ -23,6 +23,7 @@ precision mediump float; uniform sampler2D m_samp0; varying vec4 m_cord0; +uniform float m_sdrPeak; void main () { @@ -35,5 +36,9 @@ void main () rgb.rgb += 16.0 / 255.0; #endif +#if defined(KODI_TRANSFER_PQ) + rgb.rgb *= m_sdrPeak; +#endif + gl_FragColor = rgb; } diff --git a/system/shaders/GLES/2.0/gles_yuv2rgb.vert b/system/shaders/GLES/2.0/gles_yuv2rgb.vert index bc437afdc3..c96a6a9585 100644 --- a/system/shaders/GLES/2.0/gles_yuv2rgb.vert +++ b/system/shaders/GLES/2.0/gles_yuv2rgb.vert @@ -34,6 +34,7 @@ void main () { mat4 mvp = m_proj * m_model; gl_Position = mvp * m_attrpos; + gl_Position.z = -1. * gl_Position.w; m_cordY = m_attrcordY; m_cordU = m_attrcordU; m_cordV = m_attrcordV; diff --git a/system/shaders/output_d3d.fx b/system/shaders/output_d3d.fx index fd5fff1d53..e3a66abbe1 100644 --- a/system/shaders/output_d3d.fx +++ b/system/shaders/output_d3d.fx @@ -194,7 +194,7 @@ float4 OUTPUT_PS(VS_OUTPUT In) : SV_TARGET { float4 color = g_Texture.Sample(KernelSampler, In.TextureUV); [flatten] if (m_params.x) - color = saturate(0.0625 + color * 219.0 / 255.0); + color = saturate((64.0 / 1023.0) + color * (940.0 - 64.0) / 1023.0); color *= m_params.y * 2.0; color += m_params.z - 0.5; |