simvx.graphics.renderer.scene_copy

Scene colour/depth copy targets for the desktop pass split (design D1/A7).

When a material (or pass) this frame declares needs_scene_colour / needs_scene_depth, the forward renderer ends the HDR pass after the opaque family draws, copies the HDR colour + depth into the sampleable textures owned here, then re-begins a LOAD-op pass and draws the transparent phase. The transparent uber shader samples set0 b14 (scene colour) / b15 (scene depth) for refraction.

Zero-cost when unused: the full-size textures are allocated lazily on the first frame that actually needs them. Until then set0 b14/b15 point at a shared 1x1 black fallback (written once at setup) so the descriptors are never unbound and feature-off frames record no copies and allocate nothing.

Module Contents

Classes

SceneCopyTargets

Owns the scene colour + depth copy textures and their descriptor writes.

Data

API

simvx.graphics.renderer.scene_copy.log

‘getLogger(…)’

simvx.graphics.renderer.scene_copy.__all__

[‘SceneCopyTargets’, ‘SCENE_COLOUR_BINDING’, ‘SCENE_DEPTH_BINDING’]

simvx.graphics.renderer.scene_copy.SCENE_COLOUR_BINDING

14

simvx.graphics.renderer.scene_copy.SCENE_DEPTH_BINDING

15

class simvx.graphics.renderer.scene_copy.SceneCopyTargets(engine: Any)[source]

Owns the scene colour + depth copy textures and their descriptor writes.

Initialization

setup_fallback(ssbo_set: Any) None[source]

Create the shared 1x1 fallback and write it to b14/b15 (never-unbound).

capture(cmd: Any, hdr_target: Any, ssbo_set: Any) None[source]

Copy HDR colour + depth into the scene textures (records into cmd).

Called after end_hdr_pass and before rebegin_hdr_pass. On entry the HDR colour is SHADER_READ_ONLY and the HDR depth is DEPTH_STENCIL_READ_ONLY (the offscreen pass final layouts). Both HDR images are restored to those layouts so the reload pass loads them and the velocity / SSAO samplers still read the same depth. The scene textures end in SHADER_READ_ONLY for the transparent shader sample.

destroy() None[source]