aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcgeagh <mcgeagh@svn>2010-09-13 11:30:17 +0000
committermcgeagh <mcgeagh@svn>2010-09-13 11:30:17 +0000
commit049b3bbaad98713e5450fd7b819de63b07d85ef4 (patch)
tree187ded317e765a27869856ab41cc4e7b946304eb
parent27c70312ac3569bc3c0a7ccfe264c557b21ea2f6 (diff)
[ARM] OpenGL ES2.0 shaders are now seperated into different glsl files, with descriptive filenames
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33727 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--system/shaders/guishader_frag.glsl49
-rw-r--r--system/shaders/guishader_frag5.glsl34
-rw-r--r--system/shaders/guishader_frag6.glsl34
-rw-r--r--system/shaders/guishader_frag_default.glsl (renamed from system/shaders/guishader_frag0.glsl)8
-rw-r--r--system/shaders/guishader_frag_fonts.glsl (renamed from system/shaders/guishader_frag3.glsl)9
-rw-r--r--system/shaders/guishader_frag_multi.glsl (renamed from system/shaders/guishader_frag2.glsl)13
-rw-r--r--system/shaders/guishader_frag_texture.glsl (renamed from system/shaders/guishader_frag1.glsl)13
-rw-r--r--system/shaders/guishader_frag_texture_noblend.glsl (renamed from system/shaders/guishader_frag4.glsl)12
8 files changed, 22 insertions, 150 deletions
diff --git a/system/shaders/guishader_frag.glsl b/system/shaders/guishader_frag.glsl
deleted file mode 100644
index 91635c146e..0000000000
--- a/system/shaders/guishader_frag.glsl
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010 Team XBMC
- * http://www.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, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
-
-void main ()
-{
- if (m_method == 3) /*SM_FONTS*/
- {
- gl_FragColor = m_colour;
- gl_FragColor.a = texture2D(m_samp0, m_cord0.xy).a;
- }
- else if (m_method == 1) /*SM_TEXTURE*/
- {
- gl_FragColor.rgba = texture2D(m_samp0, m_cord0.xy).bgra;
- }
- else if (m_method == 2) /*SM_MULTI*/
- {
- gl_FragColor.rgba = (texture2D(m_samp0, m_cord0.xy) * texture2D(m_samp1, m_cord1.xy)).bgra;
- }
- else /*SM_DEFAULT*/
- {
- gl_FragColor = m_colour;
- }
-}
diff --git a/system/shaders/guishader_frag5.glsl b/system/shaders/guishader_frag5.glsl
deleted file mode 100644
index c903eae323..0000000000
--- a/system/shaders/guishader_frag5.glsl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2010 Team XBMC
- * http://www.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, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
-
-// SM_TEXTURE
-void main ()
-{
- gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).rgba * m_colour);
-}
diff --git a/system/shaders/guishader_frag6.glsl b/system/shaders/guishader_frag6.glsl
deleted file mode 100644
index 97424e965e..0000000000
--- a/system/shaders/guishader_frag6.glsl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2010 Team XBMC
- * http://www.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, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- */
-
-precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
-
-// SM_TEXTURE_NOBLEND
-void main ()
-{
- gl_FragColor.rgba = texture2D(m_samp0, m_cord0.xy).rgba;
-}
diff --git a/system/shaders/guishader_frag0.glsl b/system/shaders/guishader_frag_default.glsl
index 543e251d21..1477322e00 100644
--- a/system/shaders/guishader_frag0.glsl
+++ b/system/shaders/guishader_frag_default.glsl
@@ -20,13 +20,9 @@
*/
precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
+varying vec4 m_colour;
+// SM_DEFAULT shader
void main ()
{
gl_FragColor = m_colour;
diff --git a/system/shaders/guishader_frag3.glsl b/system/shaders/guishader_frag_fonts.glsl
index 1f29048d6d..24e356a303 100644
--- a/system/shaders/guishader_frag3.glsl
+++ b/system/shaders/guishader_frag_fonts.glsl
@@ -19,11 +19,12 @@
*
*/
-precision mediump float;
-uniform sampler2D m_samp0;
-varying vec4 m_cord0;
-varying vec4 m_colour;
+precision mediump float;
+uniform sampler2D m_samp0;
+varying vec4 m_cord0;
+varying vec4 m_colour;
+// SM_FONTS shader
void main ()
{
gl_FragColor.r = m_colour.r;
diff --git a/system/shaders/guishader_frag2.glsl b/system/shaders/guishader_frag_multi.glsl
index 649020d4c6..c712e3c2f7 100644
--- a/system/shaders/guishader_frag2.glsl
+++ b/system/shaders/guishader_frag_multi.glsl
@@ -19,14 +19,13 @@
*
*/
-precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
+precision mediump float;
+uniform sampler2D m_samp0;
+uniform sampler2D m_samp1;
+varying vec4 m_cord0;
+varying vec4 m_cord1;
+// SM_MULTI shader
void main ()
{
gl_FragColor.rgba = (texture2D(m_samp0, m_cord0.xy) * texture2D(m_samp1, m_cord1.xy)).bgra;
diff --git a/system/shaders/guishader_frag1.glsl b/system/shaders/guishader_frag_texture.glsl
index c155df7652..002bc26317 100644
--- a/system/shaders/guishader_frag1.glsl
+++ b/system/shaders/guishader_frag_texture.glsl
@@ -19,15 +19,12 @@
*
*/
-precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
+precision mediump float;
+uniform sampler2D m_samp0;
+varying vec4 m_cord0;
+varying vec4 m_colour;
-// SM_TEXTURE
+// SM_TEXTURE shader
void main ()
{
gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).bgra * m_colour);
diff --git a/system/shaders/guishader_frag4.glsl b/system/shaders/guishader_frag_texture_noblend.glsl
index 5483d1f59b..b118ca6b75 100644
--- a/system/shaders/guishader_frag4.glsl
+++ b/system/shaders/guishader_frag_texture_noblend.glsl
@@ -19,15 +19,11 @@
*
*/
-precision mediump float;
-uniform sampler2D m_samp0;
-uniform sampler2D m_samp1;
-varying vec4 m_cord0;
-varying vec4 m_cord1;
-varying vec4 m_colour;
-uniform int m_method;
+precision mediump float;
+uniform sampler2D m_samp0;
+varying vec4 m_cord0;
-// SM_TEXTURE_NOBLEND
+// SM_TEXTURE_NOBLEND shader
void main ()
{
gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).bgra);