feat: 3 neue shader (vibrance, grayscale, invert) auf F7-F9, blaulicht-duplikat entfernt

This commit is contained in:
2026-04-23 20:30:14 +02:00
parent dbac00e04a
commit 48bb02ca4b
5 changed files with 55 additions and 2 deletions
+26
View File
@@ -0,0 +1,26 @@
#version 300 es
precision highp float;
in vec2 v_texcoord;
uniform sampler2D tex;
out vec4 fragColor;
// Farben satter machen (Stärke: positiv = mehr, negativ = weniger)
const vec3 Balance = vec3(1.0, 1.0, 1.0);
const float Strength = 0.3;
const vec3 VIB_coeffVibrance = Balance * -Strength;
void main() {
vec4 pixColor = texture(tex, v_texcoord);
vec3 color = pixColor.rgb;
vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186);
float luma = dot(VIB_coefLuma, color);
float max_color = max(color.r, max(color.g, color.b));
float min_color = min(color.r, min(color.g, color.b));
float color_saturation = max_color - min_color;
vec3 p_col = (sign(VIB_coeffVibrance) * color_saturation - 1.0) * VIB_coeffVibrance + 1.0;
fragColor = vec4(mix(vec3(luma), color, p_col), pixColor.a);
}