automated snapshot

This commit is contained in:
sumi
2025-12-23 00:30:13 -06:00
parent c29e08bb98
commit f37bdf0604
5 changed files with 117 additions and 107 deletions

21
shaders/saturation.fs Normal file
View File

@@ -0,0 +1,21 @@
#version 330
in vec2 fragTexCoord;
in vec4 fragColor;
uniform sampler2D texture0;
uniform float uSat; // 0 = grayscale, 1 = original, >1 = boosted
out vec4 finalColor;
void main() {
vec4 c = texture(texture0, fragTexCoord) * fragColor;
// luminance (perceptual-ish)
float l = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722));
vec3 gray = vec3(l);
c.rgb = mix(gray, c.rgb, uSat);
finalColor = c; // preserves alpha
}