sh = () => raymarch({
sceneSDF: `
${opSmoothUnion()}
${opUnion()}
${rotate3D()}
${sdBox()}
${sdSphere()}
${hg_sdf()}
${opBlend()}
${easeInOutQuad()}
float glow = 0.;
vec2 sceneSDF(vec3 p) {
//p *= rotate3D(u_time * TAU, vec3(0, 1, 0));
float d = 1e10;
const float N = 20.;
for(float i = 0.; i < N; i ++) {
float angle = TAU / N * i;
vec3 q = vec3(cos(angle), 0., sin(angle)) * 1.;
q *= rotate3D(-u_time * TAU / N * 5., vec3(0, 1, 0));
d = opUnion(d, sdBox(p + q, vec3(vec2(.0001, 800.).xyx)));
}
glow += 0.01 / (0.01 + d * d * 50.) / (float(AA) * 4.);
initGDFVectors();
p *= rotate3D(easeInOutQuad(fract(u_time * 2. + .5)) * TAU, vec3(1, 1, 0));
d = opUnion(d, opBlend(fTruncatedOctahedron(p, 1.3), fIcosahedron(p, 1.3), sin(u_time * TAU) * .5 + .5));
return vec2(d, 60.);
}
`,
effect: `
vec3 effect(vec3 c) {
c += glow * vec3(1., 0.3, 0.3);
return c;
}`,
antiAliasing: 3,
logShader: true
})