simvx.graphics.renderer.reflection_probe_pass¶
Reflection-probe capture: desktop (Vulkan) backend for ReflectionProbe3D.
Captures a local environment cubemap per probe and feeds the engine’s existing split-sum IBL precompute (irradiance + GGX-prefiltered specular,
- class:
IBLPass) so meshes inside a probe’s influence box pick up the local room reflection instead of the global skybox IBL.
Pipeline (per probe, run once on enter + on explicit request_update()):
Render the scene six times from the probe’s
capture_positioninto a square offscreen target (GameViewportRenderer), one per cube face, with a 90° FOV perspective camera. After each face,vkCmdCopyImagethe colour image into face f of a per-probe source cubemap.Run :meth:
IBLPass.process_cubemapon that source cube → irradiance + prefiltered specular for this probe (reusing the global IBL compute shaders).vkCmdCopyImagethe probe’s irradiance cube (6 layers) and prefiltered cube (6 layers × N mips) into the shared cubemap arrays at the probe’s array slice (slice =probe_index * 6).
The shared arrays + a probe-box SSBO are bound to the forward set (bindings
10/11/12). The fragment shader tests each fragment’s world position against the
probe boxes (bounded loop, MAX_PROBES) and, when inside, samples that
probe’s maps (optionally box-projected) instead of the global IBL.
Capture uses its own one-time, waited command buffers: it is decoupled from the per-frame render loop and never iterates draws in Python on the hot path.
Module Contents¶
Classes¶
Owns the shared probe cubemap arrays + box SSBO and drives per-probe capture. |
Data¶
API¶
- simvx.graphics.renderer.reflection_probe_pass.__all__¶
[‘ReflectionProbePass’]
- simvx.graphics.renderer.reflection_probe_pass.log¶
‘getLogger(…)’
- simvx.graphics.renderer.reflection_probe_pass.FACE_SIZE¶
128
- class simvx.graphics.renderer.reflection_probe_pass.ReflectionProbePass(engine: Any)[source]¶
Owns the shared probe cubemap arrays + box SSBO and drives per-probe capture.
Initialization
- update_probes(adapter: Any, tree: Any, probes: list) bool[source]¶
Capture any probe that is new or has
_update_requestedset.Returns
Trueif at least one probe captured this frame (the caller must then re-submit the main scene, since face rendering clobbers the renderer’s per-frame submission lists: same contract as SubViewports).