aboutsummaryrefslogtreecommitdiff
path: root/system/shaders
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2018-01-22 20:21:30 -0800
committerLukas Rusak <lorusak@gmail.com>2018-01-27 12:46:44 -0800
commit4a30fe719e5a57fc4d3ec350b307c4903e684445 (patch)
tree19fbe122943b2c6f9ed9e0a436147d80c739aca1 /system/shaders
parente28350cefded343f9921cd416dab94e2cc372a85 (diff)
shaders: remove uneeded GLES shaders
Diffstat (limited to 'system/shaders')
-rw-r--r--system/shaders/output.glsl37
-rw-r--r--system/shaders/stretch.glsl39
-rw-r--r--system/shaders/yuv2rgb_basic_2d.arb35
-rw-r--r--system/shaders/yuv2rgb_basic_2d_UYVY.arb68
-rw-r--r--system/shaders/yuv2rgb_basic_2d_YUY2.arb68
-rw-r--r--system/shaders/yuv2rgb_basic_rect.arb35
-rw-r--r--system/shaders/yuv2rgb_basic_rect_UYVY.arb64
-rw-r--r--system/shaders/yuv2rgb_basic_rect_YUY2.arb64
-rw-r--r--system/shaders/yuv2rgb_bob.glsl64
9 files changed, 0 insertions, 474 deletions
diff --git a/system/shaders/output.glsl b/system/shaders/output.glsl
deleted file mode 100644
index a0c69c5e94..0000000000
--- a/system/shaders/output.glsl
+++ /dev/null
@@ -1,37 +0,0 @@
-#if defined(XBMC_DITHER)
-uniform sampler2D m_dither;
-uniform float m_ditherquant;
-uniform vec2 m_dithersize;
-#endif
-#if defined(KODI_3DLUT)
-uniform float m_CLUTsize;
-uniform sampler3D m_CLUT;
-#endif
-
-void main()
-{
- vec4 rgb = process();
-
-#if defined(KODI_3DLUT)
- // FIXME: can this be optimized?
- rgb = texture3D(m_CLUT, (rgb.rgb*(m_CLUTsize-1.0) + 0.5) / m_CLUTsize);
-#endif
-
-#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;
- // ditherval is multiplied by 65536/(dither_size^2) to make it [0,1[
- // FIXME: scale dither values before uploading?
- float ditherval = texture2D(m_dither, ditherpos).r * 16.0;
- rgb = floor(rgb * m_ditherquant + ditherval) / m_ditherquant;
-#endif
-
- gl_FragColor = rgb;
-}
diff --git a/system/shaders/stretch.glsl b/system/shaders/stretch.glsl
deleted file mode 100644
index f6840d6196..0000000000
--- a/system/shaders/stretch.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2010-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-uniform sampler2D img;
-uniform float m_stretch;
-varying vec2 cord;
-
-vec2 stretch(vec2 pos)
-{
- // our transform should map [0..1] to itself, with f(0) = 0, f(1) = 1, f(0.5) = 0.5, and f'(0.5) = b.
- // a simple curve to do this is g(x) = b(x-0.5) + (1-b)2^(n-1)(x-0.5)^n + 0.5
- // where the power preserves sign. n = 2 is the simplest non-linear case (required when b != 1)
- float x = pos.x - 0.5;
- return vec2(mix(x * abs(x) * 2.0, x, m_stretch) + 0.5, pos.y);
-}
-
-void main()
-{
- gl_FragColor.rgb = texture2D(img, stretch(cord)).rgb;
- gl_FragColor.a = gl_Color.a;
-}
-
diff --git a/system/shaders/yuv2rgb_basic_2d.arb b/system/shaders/yuv2rgb_basic_2d.arb
deleted file mode 100644
index 95a5a93791..0000000000
--- a/system/shaders/yuv2rgb_basic_2d.arb
+++ /dev/null
@@ -1,35 +0,0 @@
-!!ARBfp1.0
-
-#
-# Copyright (C) 2010-2013 Team XBMC
-# http://xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-
-PARAM yuvmat[4] = { program.local[0..3] };
-TEMP R0;
-TEMP R1;
-TEX R0.x, fragment.texcoord[0], texture[0], 2D;
-TEX R0.y, fragment.texcoord[1], texture[1], 2D;
-TEX R0.w, fragment.texcoord[2], texture[2], 2D;
-MOV R0.z, R0.w;
-DPH R1.r, R0, yuvmat[0];
-DPH R1.g, R0, yuvmat[1];
-DPH R1.b, R0, yuvmat[2];
-MOV R1.a, fragment.color.a;
-MOV result.color, R1;
-END
diff --git a/system/shaders/yuv2rgb_basic_2d_UYVY.arb b/system/shaders/yuv2rgb_basic_2d_UYVY.arb
deleted file mode 100644
index 8e4ea1ff84..0000000000
--- a/system/shaders/yuv2rgb_basic_2d_UYVY.arb
+++ /dev/null
@@ -1,68 +0,0 @@
-!!ARBfp1.0
-
-#
-# Copyright (C) 2010-2013 Team XBMC
-# http://xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-
-PARAM yuvmat[4] = { program.local[0..3] };
-#stepx, stepy, width, height
-PARAM dims[1] = { program.local[4] };
-TEMP f;
-TEMP pos;
-MAD pos.x , dims[0].x, -0.25, fragment.texcoord[0].x;
-MOV pos.y , fragment.texcoord[0].y;
-MUL f.x , dims[0].z, pos.x;
-MUL f.y , dims[0].w, pos.y;
-FRC f , f;
-
-TEMP c1pos;
-TEMP c2pos;
-SUB c1pos.x, 0.5, f.x;
-SUB c2pos.x, 1.5, f.x;
-MAD c1pos.x, c1pos.x, dims[0].x, pos.x;
-MAD c2pos.x, c2pos.x, dims[0].x, pos.x;
-MOV c1pos.y, pos.y;
-MOV c2pos.y, pos.y;
-
-TEMP c1;
-TEMP c2;
-TEX c1, c1pos, texture[0], 2D;
-TEX c2, c2pos, texture[0], 2D;
-
-TEMP cint;
-MUL cint.x, f.x, 2.0;
-MAD cint.y, f.x, 2.0, -1.0;
-SGE cint.z, f.x, 0.5;
-
-TEMP yuv;
-LRP yuv.g, cint.x, c1.a , c1.g;
-LRP yuv.b, cint.y, c2.g , c1.a;
-LRP yuv.r, cint.z, yuv.b, yuv.g;
-
-LRP yuv.g, f.x , c2.b , c1.b;
-LRP yuv.b, f.x , c2.r , c1.r;
-
-TEMP rgb;
-DPH rgb.r, yuv, yuvmat[0];
-DPH rgb.g, yuv, yuvmat[1];
-DPH rgb.b, yuv, yuvmat[2];
-MOV rgb.a, fragment.color.a;
-MOV result.color, rgb;
-
-END
diff --git a/system/shaders/yuv2rgb_basic_2d_YUY2.arb b/system/shaders/yuv2rgb_basic_2d_YUY2.arb
deleted file mode 100644
index 72586d0ebe..0000000000
--- a/system/shaders/yuv2rgb_basic_2d_YUY2.arb
+++ /dev/null
@@ -1,68 +0,0 @@
-!!ARBfp1.0
-
-#
-# Copyright (C) 2010-2013 Team XBMC
-# http://xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-
-PARAM yuvmat[4] = { program.local[0..3] };
-#stepx, stepy, width, height
-PARAM dims[1] = { program.local[4] };
-TEMP f;
-TEMP pos;
-MAD pos.x , dims[0].x, -0.25, fragment.texcoord[0].x;
-MOV pos.y , fragment.texcoord[0].y;
-MUL f.x , dims[0].z, pos.x;
-MUL f.y , dims[0].w, pos.y;
-FRC f , f;
-
-TEMP c1pos;
-TEMP c2pos;
-SUB c1pos.x, 0.5, f.x;
-SUB c2pos.x, 1.5, f.x;
-MAD c1pos.x, c1pos.x, dims[0].x, pos.x;
-MAD c2pos.x, c2pos.x, dims[0].x, pos.x;
-MOV c1pos.y, pos.y;
-MOV c2pos.y, pos.y;
-
-TEMP c1;
-TEMP c2;
-TEX c1, c1pos, texture[0], 2D;
-TEX c2, c2pos, texture[0], 2D;
-
-TEMP cint;
-MUL cint.x, f.x, 2.0;
-MAD cint.y, f.x, 2.0, -1.0;
-SGE cint.z, f.x, 0.5;
-
-TEMP yuv;
-LRP yuv.g, cint.x, c1.r , c1.b;
-LRP yuv.b, cint.y, c2.b , c1.r;
-LRP yuv.r, cint.z, yuv.b, yuv.g;
-
-LRP yuv.g, f.x , c2.g , c1.g;
-LRP yuv.b, f.x , c2.a , c1.a;
-
-TEMP rgb;
-DPH rgb.r, yuv, yuvmat[0];
-DPH rgb.g, yuv, yuvmat[1];
-DPH rgb.b, yuv, yuvmat[2];
-MOV rgb.a, fragment.color.a;
-MOV result.color, rgb;
-
-END
diff --git a/system/shaders/yuv2rgb_basic_rect.arb b/system/shaders/yuv2rgb_basic_rect.arb
deleted file mode 100644
index 5da8418ff9..0000000000
--- a/system/shaders/yuv2rgb_basic_rect.arb
+++ /dev/null
@@ -1,35 +0,0 @@
-!!ARBfp1.0
-
-#
-# Copyright (C) 2010-2013 Team XBMC
-# http://xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-
-PARAM yuvmat[4] = { program.local[0..3] };
-TEMP R0;
-TEMP R1;
-TEX R0.x, fragment.texcoord[0], texture[0], RECT;
-TEX R0.y, fragment.texcoord[1], texture[1], RECT;
-TEX R0.w, fragment.texcoord[2], texture[2], RECT;
-MOV R0.z, R0.w;
-DPH R1.r, R0, yuvmat[0];
-DPH R1.g, R0, yuvmat[1];
-DPH R1.b, R0, yuvmat[2];
-MOV R1.a, fragment.color.a;
-MOV result.color, R1;
-END
diff --git a/system/shaders/yuv2rgb_basic_rect_UYVY.arb b/system/shaders/yuv2rgb_basic_rect_UYVY.arb
deleted file mode 100644
index c60d66a487..0000000000
--- a/system/shaders/yuv2rgb_basic_rect_UYVY.arb
+++ /dev/null
@@ -1,64 +0,0 @@
-!!ARBfp1.0
-
-#
-# Copyright (C) 2010-2013 Team XBMC
-# http://xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-
-PARAM yuvmat[4] = { program.local[0..3] };
-TEMP f;
-TEMP pos;
-ADD pos.x , fragment.texcoord[0].x, -0.25;
-MOV pos.y , fragment.texcoord[0].y;
-FRC f , pos;
-
-TEMP c1pos;
-TEMP c2pos;
-SUB c1pos.x, 0.5, f.x;
-SUB c2pos.x, 1.5, f.x;
-ADD c1pos.x, c1pos.x, pos.x;
-ADD c2pos.x, c2pos.x, pos.x;
-MOV c1pos.y, pos.y;
-MOV c2pos.y, pos.y;
-
-TEMP c1;
-TEMP c2;
-TEX c1, c1pos, texture[0], RECT;
-TEX c2, c2pos, texture[0], RECT;
-
-TEMP cint;
-MUL cint.x, f.x, 2.0;
-MAD cint.y, f.x, 2.0, -1.0;
-SGE cint.z, f.x, 0.5;
-
-TEMP yuv;
-LRP yuv.g, cint.x, c1.a , c1.g;
-LRP yuv.b, cint.y, c2.g , c1.a;
-LRP yuv.r, cint.z, yuv.b, yuv.g;
-
-LRP yuv.g, f.x , c2.b , c1.b;
-LRP yuv.b, f.x , c2.r , c1.r;
-
-TEMP rgb;
-DPH rgb.r, yuv, yuvmat[0];
-DPH rgb.g, yuv, yuvmat[1];
-DPH rgb.b, yuv, yuvmat[2];
-MOV rgb.a, fragment.color.a;
-MOV result.color, rgb;
-
-END
diff --git a/system/shaders/yuv2rgb_basic_rect_YUY2.arb b/system/shaders/yuv2rgb_basic_rect_YUY2.arb
deleted file mode 100644
index 538677e2b6..0000000000
--- a/system/shaders/yuv2rgb_basic_rect_YUY2.arb
+++ /dev/null
@@ -1,64 +0,0 @@
-!!ARBfp1.0
-
-#
-# Copyright (C) 2010-2013 Team XBMC
-# http://xbmc.org
-#
-# This Program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This Program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with XBMC; see the file COPYING. If not, see
-# <http://www.gnu.org/licenses/>.
-#
-#
-
-PARAM yuvmat[4] = { program.local[0..3] };
-TEMP f;
-TEMP pos;
-ADD pos.x , fragment.texcoord[0].x, -0.25;
-MOV pos.y , fragment.texcoord[0].y;
-FRC f , pos;
-
-TEMP c1pos;
-TEMP c2pos;
-SUB c1pos.x, 0.5, f.x;
-SUB c2pos.x, 1.5, f.x;
-ADD c1pos.x, c1pos.x, pos.x;
-ADD c2pos.x, c2pos.x, pos.x;
-MOV c1pos.y, pos.y;
-MOV c2pos.y, pos.y;
-
-TEMP c1;
-TEMP c2;
-TEX c1, c1pos, texture[0], RECT;
-TEX c2, c2pos, texture[0], RECT;
-
-TEMP cint;
-MUL cint.x, f.x, 2.0;
-MAD cint.y, f.x, 2.0, -1.0;
-SGE cint.z, f.x, 0.5;
-
-TEMP yuv;
-LRP yuv.g, cint.x, c1.r , c1.b;
-LRP yuv.b, cint.y, c2.b , c1.r;
-LRP yuv.r, cint.z, yuv.b, yuv.g;
-
-LRP yuv.g, f.x , c2.g , c1.g;
-LRP yuv.b, f.x , c2.a , c1.a;
-
-TEMP rgb;
-DPH rgb.r, yuv, yuvmat[0];
-DPH rgb.g, yuv, yuvmat[1];
-DPH rgb.b, yuv, yuvmat[2];
-MOV rgb.a, fragment.color.a;
-MOV result.color, rgb;
-
-END
diff --git a/system/shaders/yuv2rgb_bob.glsl b/system/shaders/yuv2rgb_bob.glsl
deleted file mode 100644
index 82a41f941f..0000000000
--- a/system/shaders/yuv2rgb_bob.glsl
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2010-2013 Team XBMC
- * http://xbmc.org
- *
- * This Program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This Program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with XBMC; see the file COPYING. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#if(XBMC_texture_rectangle)
-# extension GL_ARB_texture_rectangle : enable
-# define texture2D texture2DRect
-# define sampler2D sampler2DRect
-#endif
-
-uniform sampler2D m_sampY;
-uniform sampler2D m_sampU;
-uniform sampler2D m_sampV;
-varying vec2 m_cordY;
-varying vec2 m_cordU;
-varying vec2 m_cordV;
-
-uniform mat4 m_yuvmat;
-
-uniform float m_stepX;
-uniform float m_stepY;
-uniform int m_field;
-
-void main()
-{
- vec4 yuv, rgb;
-
- vec2 offsetY;
- vec2 offsetU;
- vec2 offsetV;
- float temp1 = mod(m_cordY.y, 2*m_stepY);
-
- offsetY = m_cordY;
- offsetU = m_cordU;
- offsetV = m_cordV;
-
- offsetY.y -= (temp1 - m_stepY/2 + float(m_field)*m_stepY);
- offsetU.y -= (temp1 - m_stepY/2 + float(m_field)*m_stepY)/2;
- offsetV.y -= (temp1 - m_stepY/2 + float(m_field)*m_stepY)/2;
-
- yuv.rgba = vec4( texture2D(m_sampY, offsetY).r
- , texture2D(m_sampU, offsetU).r
- , texture2D(m_sampV, offsetV).a
- , 1.0);
- rgb = m_yuvmat * yuv;
- rgb.a = gl_Color.a;
- gl_FragColor = rgb;
-}