voksel/content/base/shaders/chunk.fs.glsl

16 lines
346 B
Text
Raw Permalink Normal View History

2021-08-26 16:26:45 +03:00
#version 330 core
out vec4 fragColor;
in vec3 passTexCoords;
2021-09-12 19:59:23 +03:00
in vec3 passLight;
2021-08-26 16:26:45 +03:00
uniform sampler2DArray textureArray;
2021-08-26 16:26:45 +03:00
void main() {
vec4 texColor = texture(textureArray, passTexCoords);
if (texColor.a < 0.1)
discard;
2022-11-15 23:38:55 +02:00
texColor.rgb = pow(texColor.rgb, vec3(2.2));
2022-11-05 20:14:50 +02:00
fragColor = vec4(texColor.rgb * passLight, texColor.a);
2021-08-29 16:17:56 +03:00
}