bnbShader(await raymarch({
sceneSDF: `
${hg_sdf()}
${sdSphere()}
${opSmoothUnion()}
${rotate3D()}
float glow1 = 0.;
float glow2 = 0.;
float glow3 = 0.;
vec2 sceneSDF(vec3 p) {
initGDFVectors();
float t = u_time * TAU;
p.z += 3.;
float box = fIcosahedron(p * rotate3D(t, vec3(1., -1.2, 2.5)), 2.3);
float sphere = sdSphere(vec3(p.x - cos(t * 3.) * 2., p.y - sin(t) * 2., p.z - sin(t * 2.) * 2.), 0.6);
//glow1 += 0.001 / (0.001 + sphere * sphere * 1.0);
glow1 += 0.1 / (0.1 + sphere * sphere * 5.0);
float sphere2 = sdSphere(vec3(p.x + cos(t) * 2., p.y - sin(t * 2.) * 2., p.z - cos(t) * 2.), 0.9);
glow2 += 0.01 / (0.01 + sphere2 * sphere2 * 1.0);
float sphere3 = sdSphere(vec3(p.x - cos(t) * 2., p.y + sin(t) * 2., p.z + sin(t * 3.) * 2.), 0.6);
glow3 += 0.001 / (0.001 + sphere3 * sphere3 * 1.0);
return vec2(opSmoothUnion(sphere3, opSmoothUnion(sphere2, opSmoothUnion(box, sphere, 1.), 1.), 1.), 1.);
}
`,
antiAliasing: 3,
eye: `vec3(0, 0, 5)`,
computeColor: computeColor(),
logShader: true
}), {
w: 540, h: 540,
numFrames: 120,
record: true,
video: 'mp4',
})