Skip to the content
Limits

Limits

These are the limits of version 0.1.0.

  • Receivers are flat rectangles, at most eight. Each one takes every triangle against its own plane, which is seamless where receivers meet at an edge and face into the same space, like a floor and its walls or the inside of a pool. Receivers that hide one another from the light, such as a box standing on a floor, both get the light.
  • One point light. No directional light, area light or spotlight cone yet.
  • Few bounces. Light reflects once off metal, or refracts through water, or through glass with at most internalReflections reflections inside, then lands. Light still inside glass after that is dropped (with three, under 1% of what a dense flint prism lands; next to nothing for a ball).
  • Glass is read from the light’s view of its front and back faces, so a ray leaves through the first face in its way. That is exact for convex solids and an approximation for concave ones.
  • Dispersion draws a glass caster’s triangles eight times for each path through it, once for each wavelength, plus once for the reflection: 17 times instead of three for crown glass, which follows one reflection inside, and water’s nine times instead of twice. On the Simulator on an M1 Pro, dispersion made an 82,000 triangle glass ball’s caustics about two and a half to three times as slow; for small casters, like the demo’s prism, the blur’s fixed cost dominates and it makes no difference. The reflection cost the pool a fifth at most. Measure on a device.
  • Metal’s self-occlusion uses height maps over the receivers, which treat a caster as solid between its lowest and highest point. Overhangs block more light than they should.
  • Spread is capped at 64 texels of the near band, so a very rough surface far from its receiver throws light that is sharper than it should be.
  • The mesh is the caustic’s resolution. Each triangle lands as one patch of light, so a mesh needs to be fine wherever light focuses.
  • Frame times on the Simulator say little about a device. Profile on hardware. The first launch on the Simulator after the shaders change can also take a minute while they are translated for the Mac’s GPU; later launches start at once.