simvx.graphics.renderer.ssao_pass¶
Screen-Space Ambient Occlusion (SSAO) pass — compute-based AO from depth buffer.
Module Contents¶
Classes¶
Compute-based SSAO: generates ambient occlusion from depth buffer. |
Data¶
API¶
- simvx.graphics.renderer.ssao_pass.__all__¶
[‘SSAOPass’]
- simvx.graphics.renderer.ssao_pass.log¶
‘getLogger(…)’
- simvx.graphics.renderer.ssao_pass.KERNEL_SIZE¶
32
- class simvx.graphics.renderer.ssao_pass.SSAOPass(engine: Any)¶
Compute-based SSAO: generates ambient occlusion from depth buffer.
Pipeline: depth -> SSAO generation (compute) -> box blur (compute) -> R8 AO texture. Operates at half resolution for performance. The blurred AO texture can be sampled in the tonemap/post-process pass to darken ambient lighting in crevices.
Kernel samples are stored in a UBO (binding 3) to stay within push constant limits.
Initialization
- property ao_view: Any¶
Blurred AO image view for sampling in post-process.
- setup(width: int, height: int, depth_view: Any, depth_image: Any = None) None¶
Initialize SSAO resources: noise texture, AO images, kernel, compute pipelines.
- render(cmd: Any, proj_matrix: numpy.ndarray) None¶
Dispatch SSAO compute + blur. Call between HDR pass end and tonemap.
Args: cmd: Active command buffer (outside any render pass). proj_matrix: Camera projection matrix (row-major numpy, transposed for GPU).
- resize(width: int, height: int, depth_view: Any, depth_image: Any = None) None¶
Recreate AO images for new dimensions.
- cleanup() None¶
Release all GPU resources.