Graphics¶
simvx.graphics is SimVX’s Vulkan renderer and window layer. App opens the window and runs
the game loop; the renderer draws whatever nodes the scene holds.
To |
Read |
|---|---|
Open a window, set the frame rate, run headless |
|
Draw 2D shapes, text and images from |
|
Place and aim a 3D camera, cast rays from the mouse |
|
Colour, texture and blend 3D surfaces |
|
Write your own GLSL |
|
Ship block-compressed textures |
|
Bring models and scenes in from Blender |
|
Test what a frame looks like |
|
Pick a windowing backend |
|
Set up bloom, fog, SSAO and the rest |
|
Run the game in a browser |
Each rendering feature has a runnable example under examples/features/3d/; browse them in the
Examples Gallery.
How the renderer works¶
The 3D renderer is GPU-driven: each frame, transforms, materials and lights go into flat NumPy arrays uploaded once, and one multi-draw-indirect call submits every visible opaque instance, so there is no per-object draw loop in Python. Transparent geometry is sorted and drawn in its own pass. Textures are bindless: a material refers to an image by index. Optional features (shadows, screen-space effects, post-processing) add no passes when they are off.
What it covers:
Lighting: directional, point and spot lights with cascaded and point shadows; image-based lighting, reflection probes and baked
IrradianceVolume3Dprobe volumes.Post-processing, set on
WorldEnvironment: HDR with bloom and tonemapping, SSAO, SSR, SSGI, TAA, motion blur, volumetric fog, and render-scale upscaling.quality_tierscales them together.Surfaces: PBR materials,
Decal3D,WaterSurface3D,OceanSurface3DandPlanarReflection3D; a procedural sky withRain3Dand material wetness.Culling: per-view frustum culling and Hi-Z GPU occlusion culling.
Offscreen views:
SubViewportrenders a subtree to a texture andRenderViewcaptures the world through anotherCamera3D, for monitors and mirrors. Split-screen has no public API yet.
Buffer sizes, descriptor layouts and pass order are implementation details that change between
builds; the source in simvx/graphics/renderer/ is the reference for them.
API reference¶
See simvx.graphics for the complete API.