First-mode design
Each animation frame traces one jittered camera path per pixel and folds it into a running linear-HDR average:
- Sphere-trace the generated
sdf(point) until its sign changes, then refine the bracket with seven binary-search steps. Near misses remain misses even when they pass within the surface epsilon.
- Read
material_base(point) and material_optics(point).
- Add next-event lighting from a sampled finite sun when the material has a non-delta opaque component.
- Continue with one sampled event:
- cosine-weighted Lambertian / importance-sampled GGX for opaque surfaces;
- perfect reflection for explicit mirror reflectivity;
- Schlick-Fresnel reflection or Snell refraction for glass.
- Add environment radiance on a miss.
- Apply Russian roulette after three bounces.
Two rgba16float textures ping-pong between sampled input and render attachment. A separate presentation pass applies ACES tone mapping and gamma. Accumulation resets after camera, viewport, scene, or rendering-mode changes. Quality presets scale resolution, bounce depth, total accumulation, and the number of finite-sun visibility samples per surface hit.