#version 400 core in vec2 textureCoords; out vec4 color; uniform sampler2D guiTexture; uniform sampler2D backgroundTexture; uniform float brightness; // 1.0 = normal uniform vec3 tintColor; // (0,0,0) = kein Tint uniform float tintStrength; // 0.0 = aus uniform bool hasForeground; uniform bool hasBackground; void main(void) { vec4 fg = hasForeground ? texture(guiTexture, textureCoords) : vec4(0.0); vec4 bg = hasBackground ? texture(backgroundTexture, textureCoords) : vec4(0.0); vec4 textureColor = mix(bg, fg, fg.a); textureColor.rgb *= brightness; //Tint (Overlay) textureColor.rgb = mix(textureColor.rgb, tintColor, tintStrength); color = textureColor; }