mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 11:17:05 -04:00
18 lines
370 B
GLSL
18 lines
370 B
GLSL
#version 430
|
|
out vec4 fragColor;
|
|
|
|
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;
|
|
}
|