stk-code_catmod/data/shaders/instanced_shadowref.frag

22 lines
414 B
GLSL
Raw Normal View History

2014-12-18 22:09:14 +01:00
#ifndef Use_Bindless_Texture
2014-08-23 00:18:14 +02:00
uniform sampler2D tex;
#endif
2014-12-18 22:09:14 +01:00
#ifdef Use_Bindless_Texture
2014-08-29 01:26:27 +02:00
flat in uvec2 handle;
2014-08-23 00:18:14 +02:00
#endif
in vec2 uv;
in vec4 color;
out vec4 FragColor;
void main(void)
{
2014-12-18 22:09:14 +01:00
#ifdef Use_Bindless_Texture
2014-08-29 01:26:27 +02:00
vec4 col = texture(sampler2D(handle), uv);
2014-08-23 00:18:14 +02:00
#else
vec4 col = texture(tex, uv);
#endif
if (col.a < 0.5) discard;
2014-11-18 03:44:45 +01:00
FragColor = vec4(exp(32. * (2. * gl_FragCoord.z - 1.) / gl_FragCoord.w));
2014-08-23 00:18:14 +02:00
}