mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
19 lines
413 B
GLSL
19 lines
413 B
GLSL
#version 460
|
|
|
|
layout(location = 0) out vec4 fragColor;
|
|
|
|
layout(location = 0) in vec2 texCoords;
|
|
|
|
uniform sampler2D color;
|
|
uniform bool transparent;
|
|
|
|
void main() {
|
|
fragColor = texture(color, texCoords);
|
|
if(transparent) {
|
|
fragColor.a = 1;
|
|
// TODO: Remove the background color. Somehow?
|
|
}
|
|
float maxColor = max(1.0, max(fragColor.r, max(fragColor.g, fragColor.b)));
|
|
fragColor.rgb = fragColor.rgb/maxColor;
|
|
}
|