From 049b3bbaad98713e5450fd7b819de63b07d85ef4 Mon Sep 17 00:00:00 2001 From: mcgeagh Date: Mon, 13 Sep 2010 11:30:17 +0000 Subject: [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 --- system/shaders/guishader_frag.glsl | 49 ---------------------- system/shaders/guishader_frag0.glsl | 33 --------------- system/shaders/guishader_frag1.glsl | 34 --------------- system/shaders/guishader_frag2.glsl | 33 --------------- system/shaders/guishader_frag3.glsl | 33 --------------- system/shaders/guishader_frag4.glsl | 34 --------------- system/shaders/guishader_frag5.glsl | 34 --------------- system/shaders/guishader_frag6.glsl | 34 --------------- system/shaders/guishader_frag_default.glsl | 29 +++++++++++++ system/shaders/guishader_frag_fonts.glsl | 34 +++++++++++++++ system/shaders/guishader_frag_multi.glsl | 32 ++++++++++++++ system/shaders/guishader_frag_texture.glsl | 31 ++++++++++++++ system/shaders/guishader_frag_texture_noblend.glsl | 30 +++++++++++++ 13 files changed, 156 insertions(+), 284 deletions(-) delete mode 100644 system/shaders/guishader_frag.glsl delete mode 100644 system/shaders/guishader_frag0.glsl delete mode 100644 system/shaders/guishader_frag1.glsl delete mode 100644 system/shaders/guishader_frag2.glsl delete mode 100644 system/shaders/guishader_frag3.glsl delete mode 100644 system/shaders/guishader_frag4.glsl delete mode 100644 system/shaders/guishader_frag5.glsl delete mode 100644 system/shaders/guishader_frag6.glsl create mode 100644 system/shaders/guishader_frag_default.glsl create mode 100644 system/shaders/guishader_frag_fonts.glsl create mode 100644 system/shaders/guishader_frag_multi.glsl create mode 100644 system/shaders/guishader_frag_texture.glsl create mode 100644 system/shaders/guishader_frag_texture_noblend.glsl 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_frag0.glsl b/system/shaders/guishader_frag0.glsl deleted file mode 100644 index 543e251d21..0000000000 --- a/system/shaders/guishader_frag0.glsl +++ /dev/null @@ -1,33 +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 () -{ - gl_FragColor = m_colour; -} diff --git a/system/shaders/guishader_frag1.glsl b/system/shaders/guishader_frag1.glsl deleted file mode 100644 index c155df7652..0000000000 --- a/system/shaders/guishader_frag1.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).bgra * m_colour); -} diff --git a/system/shaders/guishader_frag2.glsl b/system/shaders/guishader_frag2.glsl deleted file mode 100644 index 649020d4c6..0000000000 --- a/system/shaders/guishader_frag2.glsl +++ /dev/null @@ -1,33 +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 () -{ - gl_FragColor.rgba = (texture2D(m_samp0, m_cord0.xy) * texture2D(m_samp1, m_cord1.xy)).bgra; -} diff --git a/system/shaders/guishader_frag3.glsl b/system/shaders/guishader_frag3.glsl deleted file mode 100644 index 1f29048d6d..0000000000 --- a/system/shaders/guishader_frag3.glsl +++ /dev/null @@ -1,33 +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; -varying vec4 m_cord0; -varying vec4 m_colour; - -void main () -{ - gl_FragColor.r = m_colour.r; - gl_FragColor.g = m_colour.g; - gl_FragColor.b = m_colour.b; - gl_FragColor.a = texture2D(m_samp0, m_cord0.xy).a; -} diff --git a/system/shaders/guishader_frag4.glsl b/system/shaders/guishader_frag4.glsl deleted file mode 100644 index 5483d1f59b..0000000000 --- a/system/shaders/guishader_frag4.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 = vec4(texture2D(m_samp0, m_cord0.xy).bgra); -} 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_frag_default.glsl b/system/shaders/guishader_frag_default.glsl new file mode 100644 index 0000000000..1477322e00 --- /dev/null +++ b/system/shaders/guishader_frag_default.glsl @@ -0,0 +1,29 @@ +/* + * 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; +varying vec4 m_colour; + +// SM_DEFAULT shader +void main () +{ + gl_FragColor = m_colour; +} diff --git a/system/shaders/guishader_frag_fonts.glsl b/system/shaders/guishader_frag_fonts.glsl new file mode 100644 index 0000000000..24e356a303 --- /dev/null +++ b/system/shaders/guishader_frag_fonts.glsl @@ -0,0 +1,34 @@ +/* + * 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; +varying vec4 m_cord0; +varying vec4 m_colour; + +// SM_FONTS shader +void main () +{ + gl_FragColor.r = m_colour.r; + gl_FragColor.g = m_colour.g; + gl_FragColor.b = m_colour.b; + gl_FragColor.a = texture2D(m_samp0, m_cord0.xy).a; +} diff --git a/system/shaders/guishader_frag_multi.glsl b/system/shaders/guishader_frag_multi.glsl new file mode 100644 index 0000000000..c712e3c2f7 --- /dev/null +++ b/system/shaders/guishader_frag_multi.glsl @@ -0,0 +1,32 @@ +/* + * 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; + +// 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_frag_texture.glsl b/system/shaders/guishader_frag_texture.glsl new file mode 100644 index 0000000000..002bc26317 --- /dev/null +++ b/system/shaders/guishader_frag_texture.glsl @@ -0,0 +1,31 @@ +/* + * 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; +varying vec4 m_cord0; +varying vec4 m_colour; + +// SM_TEXTURE shader +void main () +{ + gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).bgra * m_colour); +} diff --git a/system/shaders/guishader_frag_texture_noblend.glsl b/system/shaders/guishader_frag_texture_noblend.glsl new file mode 100644 index 0000000000..b118ca6b75 --- /dev/null +++ b/system/shaders/guishader_frag_texture_noblend.glsl @@ -0,0 +1,30 @@ +/* + * 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; +varying vec4 m_cord0; + +// SM_TEXTURE_NOBLEND shader +void main () +{ + gl_FragColor.rgba = vec4(texture2D(m_samp0, m_cord0.xy).bgra); +} -- cgit v1.2.3