experiment day

This commit is contained in:
2024-06-03 10:28:08 +02:00
parent 34502b14f0
commit c7ff7f5308
2 changed files with 58 additions and 9 deletions

View File

@@ -44,14 +44,13 @@ void main() {
vec2 st = gl_FragCoord.xy/u_resolution;
vec3 color = vec3(0.0,0.0,0.0);
float alpha = 1.0;
vec2 s = vec2(1.,1.);
st = rotate(st, radians(-45.));
float r1 = rectSDF(st,s);
color += flip(fill(r1,.3),fill(r1,.28));
float r2 = rectSDF(st+vec2(-.07,.07),s);
color += stroke(r2, .15, .02);
//color += flip(fill(r2,.15),fill(r2,.13));
//float r3 = rectSDF(st+vec2(-.1,.1),s);
//color += flip(fill(r3,.1),fill(r3,.08));
st = rotate(st, radians(45.));
float r1 = rectSDF(st,vec2(1.));
float r2 = rectSDF(st+.15,vec2(1.));
color += stroke(r1,.5,.05);
color *= step(.325,r2);
//OH, by multing something by a fill, you only get the values that fall inside that fill
color += stroke(r2,.325,.05)*fill(r1,.525);
color += stroke(r2,.2,.05);
gl_FragColor = vec4(color, alpha);
}