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
Decal3DdecalsGlobal illumination: reflection probes plus baked
IrradianceVolume3DSH probe volumesWater: built-in Gerstner
WaterSurface3Dand FFTOceanSurface3Dpasses with refraction, foam, andPlanarReflection3Dmirror reflectionsDynamic sky and weather: procedural Preetham sky (
sky_mode="procedural") with IBL re-bake, GPU rain particles (Rain3D), and material wetness driven byWorldEnvironmentQuality tiers: one-line
WorldEnvironment.quality_tierpresets scaling the dials above
Each rendering feature has a runnable reference example under examples/features/3d/; browse them in the Examples Gallery.
Guides¶
App Class: App class, game loop, and windowing backends
Cameras (3D): Camera3D, conventions (right-handed Y-up, -Z forward)
Draw2D: immediate-mode 2D drawing: Immediate-mode 2D drawing: submission-order contract
Blender to SimVX (glTF): Exporting from Blender and importing glTF scenes
Custom Shaders: Custom GLSL vertex and fragment shaders
Visual Testing: Headless rendering, pixel assertions, and visual regression tests
Web export (browser runtime + HTML bundler) now lives in its own package; see Web Export.
Subpackages¶
Subpackage |
Description |
|---|---|
Asset loading: images and meshes from disk |
|
Low-level Vulkan wrappers |
|
Material and texture system |
|
Entity picking and raycasting |
|
High-level rendering pipelines |
|
CPU-side scene data that feeds the GPU |
|
2D overlay / UI system |
API Reference¶
See simvx.graphics for the complete API.