sphereFrame

The geometry of a sphere bulging out of the canvas: where each pixel reads the child from, where the sphere ends, and which way its surface faces.

sphereFrame(opts: {center: ArgSpec; radius: ArgSpec; depth: ArgSpec}): GatherFrame

Import effects from shaders/std and use effects.blurs.sphereFrame.

center is a position in uv. radius 1 is half the canvas height. depth is how far it bulges toward the viewer, 0 for flat and up to about 3. Feed the frame to crispTap and rimLit.

Parameters

NameTypeNotes
opts{center: ArgSpec; radius: ArgSpec; depth: ArgSpec}

Example

const sphere = sphereFrame({center: p('center'), radius: p('radius'), depth: p('depth')})

See also

  • crispTap — One clean sample of the child at a frame's warped coordinate.
  • rimLit — A tinted rim of light around the edge of a bulged surface, added on top of the child's color.
  • GatherFrame

Used by

Spherize