simvx.graphics.renderer.pass_orchestrator

PassOrchestrator: owns the forward renderer’s pass lifecycle.

Extracted from Renderer so the render-pass subsystems (shadow, point-shadow, particle, GPU-particle-compute, tilemap, light2d, text, draw2d, post-process, custom post-process, grid, gizmo, SSAO, skybox) live in one place with unified setup / resize / cleanup.

Renderer still owns frame-level orchestration (pre_render, render) and calls into the orchestrator’s render_overlays for the 2D overlay pass after tonemap.

Module Contents

Classes

PassOrchestrator

Owns the lifecycle of every render pass used by the forward renderer.

Data

API

simvx.graphics.renderer.pass_orchestrator.__all__

[‘PassOrchestrator’]

simvx.graphics.renderer.pass_orchestrator.log

‘getLogger(…)’

class simvx.graphics.renderer.pass_orchestrator.PassOrchestrator(engine: Any)[source]

Owns the lifecycle of every render pass used by the forward renderer.

Initialization

setup(ssbo_layout: Any, pipelines: simvx.graphics.renderer.pipeline_manager.PipelineManager) None[source]

Create and initialise every pass.

Order is load-bearing:

  1. Grid, shadow, point-shadow, particles, tilemap, light2d come first and are independent.

  2. TextPass → Draw2DPass (Draw2D shares TextPass’s atlas/pipeline).

  3. PostProcess / CustomPostProcess.

  4. Once post-process has built the HDR target, pipelines is rebuilt against the HDR render pass so 3D draws inside that pass match the HDR format.

  5. Gizmo, SSAO: SSAO needs the HDR depth views. Fog is applied entirely in tonemap.frag; no separate pass.

set_skybox(cubemap_view: Any, cubemap_sampler: Any, buffers: simvx.graphics.renderer.buffer_manager.BufferManager, cubemap_image: Any = None, cubemap_memory: Any = None) None[source]

Set a cubemap as the skybox and enable IBL.

Takes ownership of cubemap_image / cubemap_memory when provided so they can be destroyed at shutdown.

Re-installing a skybox (a colour-gradient recolour or the dynamic procedural sky re-baking as the sun sweeps) first tears down the previous pass + owned cubemap so repeated installs don’t leak. The device is drained beforehand because an in-flight frame may still reference the old cubemap descriptor; this only fires on an actual re-install (the first install has nothing to free), so the steady common path is untouched.

resize(width: int, height: int, output_extent: tuple[int, int] | None = None) None[source]

Resize passes that track the framebuffer size. Returns the render pass that 3D pipelines should be compiled against after resize.

width / height are the HDR-chain (internal) extent; the optional output_extent is the swapchain extent when they differ (render scale). TAA consumes it to place its resolved output + history at the output extent (TAAU); every other pass is internal-extent sized.

pipeline_render_pass() Any[source]

Return the render pass that 3D pipelines should be compiled against.

rebuild_hdr_pass_pipelines(hdr_rp: Any) None[source]

Rebuild every non-forward pass that draws into the HDR pass against hdr_rp. Used by the thin G-buffer toggle (A9): flipping the G-buffer changes the HDR pass’s colour-attachment count, which makes the existing skybox/grid/particle/billboard/tilemap/gizmo pipelines render-pass- incompatible, so they must be recompiled. The forward mesh + SSAO + ShaderMaterial pipelines are rebuilt by the Renderer around this call.

begin_frame() None[source]

Reset per-frame state on passes that buffer submissions.

cleanup() None[source]

Destroy every pass and the skybox cubemap ownership.