simvx.graphics.renderer.custom_post_process

Custom user-defined post-processing passes — fullscreen shader effects.

Each PostProcessEffect from core is compiled into a Vulkan pipeline that reads the current framebuffer and writes to a ping-pong render target. Effects run after built-in post-processing (bloom, SSAO) but before tone mapping, operating in HDR space (R16G16B16A16_SFLOAT).

Module Contents

Classes

CustomPostProcessPass

Manages custom user post-process effects as fullscreen Vulkan passes.

Data

API

simvx.graphics.renderer.custom_post_process.__all__

[‘CustomPostProcessPass’]

simvx.graphics.renderer.custom_post_process.log[source]

‘getLogger(…)’

class simvx.graphics.renderer.custom_post_process.CustomPostProcessPass(engine: Any)[source]

Manages custom user post-process effects as fullscreen Vulkan passes.

Ping-pongs between two render targets so multiple effects can chain. Integrates with the existing PostProcessPass pipeline.

Initialization

setup() None[source]

Create shared GPU resources.

sync_effects(effects: list[simvx.core.world_environment.PostProcessEffect]) None[source]

Synchronise GPU state with the current list of PostProcessEffects.

Creates/destroys pipelines as effects are added/removed/changed.

render(cmd: Any, input_color_view: Any, depth_view: Any, width: int, height: int) Any[source]

Execute all enabled custom effects, ping-ponging between targets.

Args: cmd: Vulkan command buffer (must be outside any render pass). input_color_view: Image view of the current frame (post-tonemap). depth_view: Depth buffer image view. width: Framebuffer width. height: Framebuffer height.

Returns: The image view of the final result (for blitting to swapchain), or None if no effects ran.

property has_effects: bool
resize(width: int, height: int) None[source]

Recreate ping-pong targets and all pipelines for new dimensions.

cleanup() None[source]

Release all GPU resources.