simvx.graphics.renderer.ibl_pass

Image-Based Lighting pass: compute shader pipeline for IBL map generation.

Generates three IBL textures from an environment cubemap:

  1. Irradiance cubemap (32x32): diffuse hemisphere convolution

  2. Prefiltered specular cubemap (128x128 with mip chain): GGX importance sampling

  3. BRDF integration LUT (512x512, RG16F): split-sum approximation

Module Contents

Classes

IBLPass

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’…

setup() None[source]

Create compute pipelines for all three IBL processing stages.

get_irradiance_view() Any[source]

Return the irradiance cubemap image view.

get_prefiltered_view() Any[source]

Return the prefiltered specular cubemap image view.

get_brdf_lut_view() Any[source]

Return the BRDF LUT image view.

get_sampler() Any[source]

Return the IBL sampler.

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_id is the caller’s bounded slot (reflection probes pass their array slot, 0..N-1), so the bundle set {(slot, frame_slot)} is bounded by MAX_BUNDLES regardless of probe churn: bundles are reused when a slot is reassigned (record_convolution rebinds 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_convolution to 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_brdf also (re)generates the shared BRDF LUT (only needed for the one-shot skybox path).

cleanup() None[source]

Destroy all GPU resources owned by the IBL pass.