Cubyz/assets/cubyz/shaders/item_texture_post.fs
IntegratedQuantum 9898db654b Specify the location of all shader in/out parameters.
also normalized the version and layout formatting
progress towards #1376
2025-05-02 14:53:57 +02:00

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;
}