simvx.graphics.renderer.ibl_pass¶
Image-Based Lighting pass: compute shader pipeline for IBL map generation.
Generates three IBL textures from an environment cubemap:
Irradiance cubemap (32x32): diffuse hemisphere convolution
Prefiltered specular cubemap (128x128 with mip chain): GGX importance sampling
BRDF integration LUT (512x512, RG16F): split-sum approximation
Module Contents¶
Classes¶
Compute-shader IBL processing: irradiance, prefiltered specular, and BRDF LUT. |
Data¶
API¶
- simvx.graphics.renderer.ibl_pass.__all__¶
[‘IBLPass’]
- simvx.graphics.renderer.ibl_pass.log¶
‘getLogger(…)’
- simvx.graphics.renderer.ibl_pass.IRRADIANCE_SIZE¶
32
- simvx.graphics.renderer.ibl_pass.PREFILTER_SIZE¶
128
- simvx.graphics.renderer.ibl_pass.PREFILTER_MIP_LEVELS¶
5
- simvx.graphics.renderer.ibl_pass.BRDF_LUT_SIZE¶
512
- class simvx.graphics.renderer.ibl_pass.IBLPass(engine: Any)[source]¶
Compute-shader IBL processing: irradiance, prefiltered specular, and BRDF LUT.
Initialization
- MAX_BUNDLES¶
None
- __slots__¶
(‘_engine’, ‘_irradiance_pipeline’, ‘_irradiance_layout’, ‘_prefilter_pipeline’, ‘_prefilter_layout’…
- get_irradiance_image() Any[source]¶
Return the irradiance cubemap image (for copy into a probe array).
- get_prefiltered_image() Any[source]¶
Return the prefiltered specular cubemap image (for copy into a probe array).
- acquire_bundle(owner_id: int, frame_slot: int) dict[str, Any][source]¶
Return a per-(owner, frame-in-flight) descriptor bundle, allocated on first use.
owner_idis the caller’s bounded slot (reflection probes pass their array slot, 0..N-1), so the bundle set{(slot, frame_slot)}is bounded byMAX_BUNDLESregardless of probe churn: bundles are reused when a slot is reassigned (record_convolutionrebinds the source cube each call), so the descriptor pool never leaks or exhausts. A distinct bundle per frame-in-flight ensures a probe re-convolved on consecutive frames never updates a set still in use by the previous in-flight frame.
- process_cubemap(cubemap_view: Any, cubemap_sampler: Any) None[source]¶
Run all IBL processing on the given environment cubemap (one-shot).
Submits + waits on its own command buffer. Used by the skybox install path at setup; not the steady-state hot path. Reflection probes use
- Meth:
record_convolutionto record into the primary frame cmd instead.
- record_convolution(cmd: Any, cubemap_view: Any, cubemap_sampler: Any, bundle: dict[str, Any] | None = None, *, with_brdf: bool = False) None[source]¶
Record the irradiance + prefilter convolution of cubemap_view into cmd.
No submit, no wait: the caller owns the command buffer (the primary frame cmd for probes). Reads from the given per-owner bundle so concurrent probe convolutions in one cmd never share a descriptor set. Leaves the irradiance + prefilter output images in SHADER_READ_ONLY_OPTIMAL ready for the per-probe array copy.
with_brdfalso (re)generates the shared BRDF LUT (only needed for the one-shot skybox path).