2021-08-26 16:26:45 +03:00
|
|
|
#version 330 core
|
|
|
|
out vec4 fragColor;
|
|
|
|
|
2022-11-12 19:47:28 +02:00
|
|
|
in vec3 passTexCoords;
|
2021-09-12 19:59:23 +03:00
|
|
|
in vec3 passLight;
|
2021-08-26 16:26:45 +03:00
|
|
|
|
2022-11-12 19:47:28 +02:00
|
|
|
uniform sampler2DArray textureArray;
|
2021-08-26 16:26:45 +03:00
|
|
|
|
|
|
|
void main() {
|
2022-11-12 19:47:28 +02:00
|
|
|
vec4 texColor = texture(textureArray, passTexCoords);
|
2022-11-15 15:03:30 +02:00
|
|
|
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
|
|
|
}
|