simvx.graphics.renderer.ssgi_pass¶
Screen-space global illumination pass (design D8, RM-E8).
Half-res, Hi-Z traced one-bounce indirect DIFFUSE that writes the design-D8
indirect-diffuse hook (set0 b17) so it never edits the uber shading math. It is
the diffuse sibling of :class:SSRPass (RM-E4) and deliberately reuses its
screen-trace machinery: the same MIN-Z depth pyramid (ssr_hiz.comp via
- class:
HiZPass), the same scene-colour mip chain (A12 mipgen), and the same thin G-buffer read (A9). Each frame, after the HDR pass:
the HDR colour is copied into a small mip chain so the gather reads a slightly blurred bounce (shared idiom with SSR);
a MIN-Z depth pyramid is built with the :class:
HiZPassmachinery;a compute trace (
ssgi_trace.comp) casts a cosine hemisphere of rays per half-res pixel, marches each through screen space, and gathers the on-screen scene colour it hits: one bounce of indirect diffuse, written noisy to a half-res raw target;a temporal filter (
ssgi_temporal.comp) reprojects the accumulated history through the previous view-projection and blends the fresh trace in (TAA-style denoise), writing the settled result to the b17 target; the driver copies that back into the history image for next frame.
The uber shader samples b17 and composites the bounce OVER the flat/IBL ambient (RM-D8fix); a ray miss / open direction contributes 0 there so the ambient fallback is untouched. Like SSR the result is one frame late and converges within a few frames for a static view (the golden captures a settled frame).
Zero-cost when unused: the whole pass is lazily created the first frame SSGI is
active (mirroring SSAO/SSR/velocity), and the uber’s indirect_diffuse_enabled
gate stays 0 otherwise, so b17 is never sampled and feature-off frames are
byte-identical.
Module Contents¶
Classes¶
Half-res Hi-Z screen-space GI into the D8 indirect-diffuse hook. |
Data¶
API¶
- simvx.graphics.renderer.ssgi_pass.__all__¶
[‘SSGIPass’]
- simvx.graphics.renderer.ssgi_pass.log¶
‘getLogger(…)’
- class simvx.graphics.renderer.ssgi_pass.SSGIPass(engine: Any)[source]¶
Half-res Hi-Z screen-space GI into the D8 indirect-diffuse hook.
Initialization
- setup(width: int, height: int, hdr_colour_image: Any, depth_view: Any, depth_image: Any, gbuffer_view: Any, gbuffer_image: Any = None) None[source]¶
Allocate the pyramid, scene chain, raw/history/output targets and pipelines.
- render(cmd: Any, proj_matrix: numpy.ndarray, view_matrix: numpy.ndarray) None[source]¶
Copy scene colour, build the min-Z pyramid, trace + temporally denoise.
Call after
end_hdr_pass(HDR colour SHADER_READ, depth DEPTH_RO, gbuffer SHADER_READ), outside any render pass. Mirrors SSRPass.render.
- resize(width: int, height: int, hdr_colour_image: Any, depth_view: Any, depth_image: Any, gbuffer_view: Any, gbuffer_image: Any = None) None[source]¶
Recreate the scene chain + targets + pyramid for a new internal extent.