Shaders: Remove some unused shaders.

This commit is contained in:
Vincent Lejeune 2014-02-08 18:19:16 +01:00
parent 3fdae349b2
commit ab05cb45b8
7 changed files with 2 additions and 198 deletions

View File

@ -1,17 +0,0 @@
#version 130
uniform float far;
uniform float objectid;
uniform sampler2D tex;
noperspective in vec3 nor;
in vec2 uv;
out vec4 Albedo;
out vec4 NormalDepth;
out vec4 Specular;
void main()
{
Albedo = texture(tex, uv);
NormalDepth = vec4(0.5 * normalize(nor) + 0.5, gl_FragCoord.z);
Specular = vec4(0.);
}

View File

@ -1,18 +0,0 @@
#version 130
uniform vec3 windDir;
uniform mat4 ModelViewProjectionMatrix;
uniform mat4 TransposeInverseModelView;
noperspective out vec3 nor;
out vec2 uv;
void main()
{
uv = gl_MultiTexCoord0.st;
vec4 vertexPosition = gl_Vertex;
vertexPosition.xyz += windDir * gl_Color.r;
nor = (TransposeInverseModelView * vec4(gl_Normal, 1.)).xyz;
gl_Position = ModelViewProjectionMatrix * vertexPosition;
}

View File

@ -1,39 +0,0 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2013 the SuperTuxKart team
//
// 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 3
// of the License, 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Jean-manuel clemencon (c) supertuxkart 2013
// bubble gum shield
// TODO: Add a nice texture and soft edges when intersect with geometry
#version 130
uniform sampler2D tex;
uniform float transparency;
in vec2 uv;
noperspective in vec3 eyeVec;
noperspective in vec3 normal;
out vec4 FragColor;
void main()
{
float inter = dot(normal, eyeVec);
float m = texture(tex, vec2(0.5, uv.y)).r;
inter = 1.0 - inter;
float alpha = inter + 1.0;// * m;
FragColor = vec4(0.8, 0.16, 0.48, alpha);
}

View File

@ -1,43 +0,0 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2013 the SuperTuxKart team
//
// 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 3
// of the License, 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Jean-manuel clemencon (c) supertuxkart 2013
// Creates a bubble gum shield effect
// ---
// TODO: The texture should reflect the strength of the shield,
// such that the user gets to know whether the shield has several
// "layers" or whether the shield is about to break.
#version 130
uniform mat4 ModelViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat4 TransposeInverseModelView;
out vec2 uv;
noperspective out vec3 eyeVec;
noperspective out vec3 normal;
void main()
{
vec4 viewp = ModelViewMatrix * gl_Vertex;
eyeVec = normalize(-viewp).xyz;
normal = (TransposeInverseModelView * vec4(gl_Normal, 1.).xyz;
gl_Position = ProjectionMatrix * viewp;
uv = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
}

View File

@ -1,40 +0,0 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2013 the SuperTuxKart team
//
// 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 3
// of the License, 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Jean-manuel clemencon supertuxkart
// Creates a cone lightbeam effect by smoothing edges
// Original idea: http://udn.epicgames.com/Three/VolumetricLightbeamTutorial.html
// TODO: Soft edges when it intesects geometry
// Some artefacts are still visible
#version 130
uniform sampler2D tex;
uniform float transparency;
in vec2 uv;
noperspective in vec3 eyeVec;
noperspective in vec3 normal;
out vec4 FragColor;
void main()
{
float inter = dot(normal, eyeVec);
float m = texture(tex, vec2(0.5, uv.y)).r;
float alpha = inter * inter * inter * inter * m;
FragColor = vec4(1.0, 1.0, 0.8, alpha);
}

View File

@ -1,39 +0,0 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2013 the SuperTuxKart team
//
// 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 3
// of the License, 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Jean-manuel clemencon (C) Copyright supertuxkart
// Creates a cone lightbeam effect by smoothing edges
#version 130
uniform mat4 ModelViewMatrix;
uniform mat4 ProjectionMatrix;
uniform mat4 TransposeInverseModelView;
out vec2 uv;
noperspective out vec3 eyeVec;
noperspective out vec3 normal;
void main()
{
vec4 viewp = ModelViewMatrix * gl_Vertex;
eyeVec = normalize(-viewp).xyz;
normal = (TransposeInverseModelView * vec4(gl_Normal, 1.).xyz;
gl_Position = ProjectionMatrix * viewp;
uv = gl_MultiTexCoord0.st;
}

View File

@ -121,9 +121,9 @@ void Shaders::loadShaders()
m_shaders[ES_SPHERE_MAP] = glsl_noinput(dir + "objectpass.vert", dir + "objectpass_spheremap.frag");
m_shaders[ES_GRASS] = glslmat(dir + "grass.vert", dir + "grass.frag",
m_shaders[ES_GRASS] = glslmat(std::string(""), dir + "pass.frag",
m_callbacks[ES_GRASS], EMT_TRANSPARENT_ALPHA_CHANNEL);
m_shaders[ES_GRASS_REF] = glslmat(dir + "grass.vert", dir + "grass.frag",
m_shaders[ES_GRASS_REF] = glslmat(std::string(""), dir + "pass.frag",
m_callbacks[ES_GRASS], EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
m_shaders[ES_BUBBLES] = glslmat(dir + "bubble.vert", dir + "bubble.frag",