# Fog Distance-based fog via WorldEnvironment. ```{raw} html ▶ Run in browser ``` **Tags:** `3d` Demonstrates: - Distance fog with adjustable density/start/end - Fog colour control - Height fog toggle - Fog mode switching (linear / exponential / exponential_squared) - Bloom + tonemap combined with fog Controls: A / D - Orbit camera left / right W / S - Zoom in / out Q / E - Raise / lower camera 1 - Toggle fog 2 - Toggle bloom 3 - Cycle fog mode Up / Down - Adjust fog density Left / Right - Adjust tonemap exposure Escape - Quit Run: uv run python examples/features/3d/fog.py ## Source ```{literalinclude} ../../examples/features/3d/fog.py :language: python :linenos: ```