stk-code_catmod/data/shaders/objectpass_ref.frag
vincentlj 45db87de8a Merge normals and depth RTT into a single one
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14754 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 16:59:55 +00:00

24 lines
371 B
GLSL

#version 130
uniform sampler2D tex;
uniform int hastex;
uniform float objectid;
noperspective in vec3 nor;
void main() {
//if (hastex != 0) {
vec4 col = texture2D(tex, gl_TexCoord[0].xy);
if (col.a < 0.5)
discard;
gl_FragData[0] = col;
//} else {
// gl_FragData[0] = gl_Color;
//}
gl_FragData[1] = vec4(0.5 * normalize(nor) + 0.5, gl_FragCoord.z);
}