simvx.graphics.renderer.fog_pass¶
Volumetric fog pass — distance-based and height-based fog via compute shader.
Module Contents¶
Classes¶
Compute-based volumetric fog: blends scene color with fog based on depth. |
Data¶
API¶
- simvx.graphics.renderer.fog_pass.__all__¶
[‘FogPass’]
- simvx.graphics.renderer.fog_pass.log¶
‘getLogger(…)’
- class simvx.graphics.renderer.fog_pass.FogPass(engine: Any)¶
Compute-based volumetric fog: blends scene color with fog based on depth.
Supports linear, exponential, and exponential-squared distance fog, plus optional height-based fog falloff. Operates in-place on the HDR color image between the scene render and tone mapping.
Initialization
- setup(width: int, height: int, depth_view: Any, color_view: Any) None¶
Initialize fog compute pipeline and descriptors.
- render(cmd: Any, inv_vp: numpy.ndarray, camera_y: float = 0.0) None¶
Dispatch fog compute shader. Call after HDR pass ends, before tonemap.
Args: cmd: Active command buffer (outside any render pass). inv_vp: Inverse view-projection matrix (row-major numpy). camera_y: Camera world Y position for height fog.
- resize(width: int, height: int, depth_view: Any, color_view: Any) None¶
Update descriptors for new dimensions.
- cleanup() None¶
Release all GPU resources.