stk-code_catmod/data/shaders/gum_shield.frag
curaga c96bd8d64e Make gum_shield.frag compile
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13550 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-08-22 15:44:56 +00:00

21 lines
455 B
GLSL

// Jean-manuel clemencon (c) supertuxkart 2013
// bubble gum shield
// TODO: Add a nice texture and soft edges when intersect with geometry
uniform sampler2D tex;
uniform float transparency;
varying vec2 uv;
varying vec3 eyeVec;
varying vec3 normal;
void main()
{
float inter = dot(normal, eyeVec);
float m = texture2D(tex, vec2(0.5, uv.y)).r;
inter = 1.0 - inter;
float alpha = inter + 1.0;// * m;
gl_FragColor = vec4(0.8, 0.16, 0.48, alpha);
}