Caffeine

Volumetric light

Reference Namespace: `Caffeine::Render` Last verified: Source: render/RenderFeatures.hpp

Analytical height fog computed inside the forward shader: what each quality level costs, and what the engine still does not do (froxel volumes, god rays).

Active in Forward Render Features → Volumetrics (or caffeine.forwardrender.setVolumetrics). By default it is Off.

There is no second geometry draw. The fog marches from the camera to the surface inside the already running shader:

  • Low — 6 steps
  • Medium — 12 steps
  • High — 24 steps
  • Density and Height control density and the falloff with altitude
  • Anisotropy turns the fog towards the sun
  • Sample shadows reads the shadow map at each step (more expensive; leave it off if the frame goes over 16 ms)

A froxel volume does not exist yet, and neither do god rays. See forward-render-features.md for the component and the Lua API.

A volumetric-cloud component with a non-zero mist density forces the scene fog to Low when volumetrics are otherwise off, so ground geometry sits in the same mist as the sky.