acron.fog

Physically based volumetric fog: a froxel volume (Hillaire 2015, Wronski 2014) on acron.sky, lit by the sun and moon with their shadows, the sky and Acron’s own point lights and spotlights.

The pieces (each its own module; the package re-exports the API):

  • FogQuality, PRESETS (config) — the grid and its options per preset (low / medium / high) and the depth slicing (slice_depth() / slice_w()). Pure Python.

  • FogVolume (volumes) — a box, sphere or ellipsoid of fog with its own density, albedo and noise, placed by a node or a position.

  • LocalLights (lights) — Acron PointLight / Spotlight nodes packed into a texture each frame, for the fog and for lit shaders (shaderlib/local_lights.glsl).

  • VolumetricFog (renderer) — the scatter and integrate passes wired to an acron.sky.Environment; every shader’s apply_atmosphere (shaderlib/atmosphere.glsl and fog.glsl) then reads the volume.

assemble_sources() builds the passes’ GLSL without GL (for tests).

Global Functions

assemble_sources(pass_name: str, q='medium', defines: dict | None = None, *, frame=None, version: int | None = None) → tuple

(vertex, fragment) text of a fog pass for preset q (no GL). frame: an acron.sky.FrameUniforms (default a fresh one with the fog’s slots).