createCanvas(600, 600, WEBGL)
fbo = new Framebuffer(window)
blurShader = createShader(vert, frag)
_renderer._freeBuffers(shape.gid)
shape = bezierToPipeGeom(genBezier())
rotX = random(-1,1) * 0.0002
rotY = random(-1,1) * 0.0002
const millisPerShape = 5000
const shapeIdx = floor(millis() / millisPerShape)
if (!shape || shapeIdx !== lastShapeIdx) {
const eyeZ = (height/2) / tan(PI/6)
perspective(PI/3, width/height, near, far)
const targetDepth = 500 + 150 * sin(millis() * 0.001)
const blurIntensity = 0.02
ambientLight(color('#baddf5'))
pointLight(255, 255, 255, width/2, -height/2, 200)
_renderer.getTexture(fbo.depth).setInterpolation(
blurShader.setUniform('uImg', fbo.color)
blurShader.setUniform('uDepth', fbo.depth)
blurShader.setUniform('uSize', [width, height])
blurShader.setUniform('uIntensity', blurIntensity)
blurShader.setUniform('uNumSamples', 25)
blurShader.setUniform('uTargetZ', targetDepth)
blurShader.setUniform('uNear', near)
blurShader.setUniform('uFar', far)
rect(0, 0, width, -height)