This commit is contained in:
minish 2025-09-12 01:14:33 -04:00
parent b3acda860f
commit b547941f36
Signed by: min
SSH Key Fingerprint: SHA256:mf+pUTmK92Y57BuCjlkBdd82LqztTfDCQIUp0fCKABc
1 changed files with 6 additions and 8 deletions

View File

@ -9,8 +9,8 @@ const vec2 zero = vec2(0.0);
// const vec4 darker = vec4(0.0235, 0.0274, 0.0549, 1.0); // const vec4 darker = vec4(0.0235, 0.0274, 0.0549, 1.0);
// const vec4 lighter = vec4(0.1058, 0.1137, 0.1450, 1.0); // const vec4 lighter = vec4(0.1058, 0.1137, 0.1450, 1.0);
const vec4 darker = vec4(0.01, 0.01, 0.01, 1.0); const vec4 darker = vec4(-0.2, -0.2, -0.2, 1.0);
const vec4 lighter = vec4(0.05, 0.05, 0.05, 1.0); const vec4 lighter = vec4(0.082, 0.082, 0.099, 1.0);
vec3 mod289(vec3 x) { vec3 mod289(vec3 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0; return x - floor(x * (1.0 / 289.0)) * 289.0;
@ -82,8 +82,8 @@ void main() {
float slowtime3 = u_time / 1.5; float slowtime3 = u_time / 1.5;
float off = 0.2 + (0.02 * sin(20.0 * angle + slowtime2)) * (1.4 * sin(10.0 * angle + slowtime3)); float off = 0.2 + (0.02 * sin(20.0 * angle + slowtime2)) * (1.4 * sin(10.0 * angle + slowtime3));
// apply cutoff if we are too close to center // apply cutoff if we are too close to center,
float vigc = (vig * step(off / 3.0, vig)) - off; float vigc = (vig * step(off / 3.0, vig) - off);
// randomize noise pattern every second ish // randomize noise pattern every second ish
float fasttime = u_time * 1.1; float fasttime = u_time * 1.1;
@ -91,12 +91,10 @@ void main() {
float noise = snoise(vec2(gl_FragCoord.x * gl_FragCoord.y, second)); float noise = snoise(vec2(gl_FragCoord.x * gl_FragCoord.y, second));
// quantize vignette colors // quantize vignette colors
float vigq = floor((1.0 - vigc) * 13.0) / 13.0; float vigq = floor(vigc * 13.0) / 13.0;
// blend noise // blend noise
float final = vigq; float final = 1.0 - vigq;
gl_FragColor = mix(darker, lighter, final); gl_FragColor = mix(darker, lighter, final);
// vec2 c = gl_FragCoord.xy - center;
// gl_FragColor = vec4(vec3(smoothstep(-PI, PI, atan(c.y, c.x))), 1.0);
} }