2013-08-07 23:59:15 -04:00
|
|
|
// 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;
|
2013-08-22 11:44:56 -04:00
|
|
|
inter = 1.0 - inter;
|
|
|
|
float alpha = inter + 1.0;// * m;
|
2013-08-07 23:59:15 -04:00
|
|
|
|
|
|
|
gl_FragColor = vec4(0.8, 0.16, 0.48, alpha);
|
|
|
|
}
|