stk-code_catmod/data/shaders/instanced_shadowref.frag

22 lines
422 B
GLSL
Raw Normal View History

2014-08-22 18:18:14 -04:00
#ifndef GL_ARB_bindless_texture
uniform sampler2D tex;
#endif
#ifdef GL_ARB_bindless_texture
2014-08-28 19:26:27 -04:00
flat in uvec2 handle;
2014-08-22 18:18:14 -04:00
#endif
in vec2 uv;
in vec4 color;
out vec4 FragColor;
void main(void)
{
#ifdef GL_ARB_bindless_texture
2014-08-28 19:26:27 -04:00
vec4 col = texture(sampler2D(handle), uv);
2014-08-22 18:18:14 -04:00
#else
vec4 col = texture(tex, uv);
#endif
if (col.a < 0.5) discard;
2014-11-02 13:07:02 -05:00
FragColor = vec4(exp(8. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w));
2014-08-22 18:18:14 -04:00
}