stk-code_catmod/data/shaders/objectpass_ref.frag
vincentlj 90f701c42d OGL32CTX: Attempt to replace implicitly defined uniforms for objectpass
This breaks animated textures in xr591...

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14990 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-10 00:31:22 +00:00

27 lines
433 B
GLSL

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