stk-code_catmod/data/shaders/objectref.frag
vincentlj 55d085bf6d STKMesh: Now use separate shader for ref/noref object
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@15012 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-12 17:40:39 +00:00

15 lines
327 B
GLSL

#version 130
uniform sampler2D texture;
in vec2 uv;
noperspective in vec3 nor;
void main(void)
{
vec4 tex = texture2D(texture, uv);
if (tex.a < 0.5)
discard;
gl_FragData[0] = vec4(tex.xyz, 1.);
gl_FragData[1] = vec4(0.5 * normalize(nor) + 0.5, gl_FragCoord.z);
gl_FragData[2] = vec4(1. - tex.a);
}