stk-code_catmod/data/shaders/instanced_shadowref.frag

22 lines
414 B
GLSL
Raw Normal View History

2014-12-18 16:09:14 -05:00
#ifndef Use_Bindless_Texture
2014-08-22 18:18:14 -04:00
uniform sampler2D tex;
#endif
2014-12-18 16:09:14 -05:00
#ifdef Use_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)
{
2014-12-18 16:09:14 -05:00
#ifdef Use_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-17 21:44:45 -05:00
FragColor = vec4(exp(32. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w));
2014-08-22 18:18:14 -04:00
}