Graphics Backend

The simvx.graphics package provides GPU-accelerated Vulkan rendering for SimVX.

Architecture

SimVX uses a GPU-driven forward+ renderer: all draw calls use vkCmdDrawIndexedIndirect with no Python loops during rendering. Object transforms, materials, and draw commands are packed into flat NumPy arrays and uploaded to SSBOs once per frame. Screen-space effects read an opt-in thin G-buffer attachment; every optional feature is zero-cost when unused.

Key Features

  • Multi-draw indirect: thousands of objects in a single Vulkan draw call

  • SSBO-driven data: transforms, materials, and lights in Shader Storage Buffer Objects

  • Bindless textures: up to 4096 textures in a single descriptor array

  • Multi-viewport: split-screen, picture-in-picture, offscreen render targets (SubViewport, RenderView)

  • Culling: CPU per-viewport frustum culling plus Hi-Z GPU occlusion culling

  • Post-processing: HDR pipeline with bloom, tonemapping, SSAO, TAA, motion blur, volumetric fog, and render-scale upscaling with TAAU

  • Screen-space effects: SSR reflections, SSGI indirect diffuse, and projected Decal3D decals

  • Global illumination: reflection probes plus baked IrradianceVolume3D SH probe volumes

  • Water: built-in Gerstner WaterSurface3D and FFT OceanSurface3D passes with refraction, foam, and PlanarReflection3D mirror reflections

  • Dynamic sky and weather: procedural Preetham sky (sky_mode="procedural") with IBL re-bake, GPU rain particles (Rain3D), and material wetness driven by WorldEnvironment

  • Quality tiers: one-line WorldEnvironment.quality_tier presets scaling the dials above

Each rendering feature has a runnable reference example under examples/features/3d/; browse them in the Examples Gallery.

Guides

Web export (browser runtime + HTML bundler) now lives in its own package; see Web Export.

Subpackages

Subpackage

Description

simvx.graphics.assets

Asset loading: images and meshes from disk

simvx.graphics.gpu

Low-level Vulkan wrappers

simvx.graphics.materials

Material and texture system

simvx.graphics.picking

Entity picking and raycasting

simvx.graphics.renderer

High-level rendering pipelines

simvx.graphics.scene

CPU-side scene data that feeds the GPU

simvx.graphics.ui

2D overlay / UI system

API Reference

See simvx.graphics for the complete API.