Rendering
Turian renders 3D with a single SDL3-GPU renderer (Vulkan / Metal / D3D12) shared by the editor viewport and the shipped game — so what you see while editing is what the game draws: metallic-roughness PBR, directional shadow mapping, normal mapping, and direct support for compressed (BCn / KTX2) textures.
Two small modules
The renderer is split into engine-independent packages so it isn't welded to the editor's UI toolkit:
gpu— a thin window + GPU device platform layer over SDL3's GPU API. It owns the OS window, device, and swapchain, and exposes the translated SDL3 API plus a per-frame command buffer. It also offers a screenshot helper (texture readback → TGA) handy for debugging.render— the scene renderer: PBR pipeline, shadow pass, mesh/texture upload, and the draw loop. It depends ongpuand the engine's scene/asset types, and takes a GPU device, a color target, the scene nodes, and asset bytes via callbacks — no UI dependency.
The editor feeds render dvui's device and an offscreen target; the game feeds
it an SDL window's swapchain. Both resolve assets (meshes, textures, materials)
by GUID through the same byte-source seam — from the cooked .cache in the
editor, from the packaged .oap in the game.
Software fallback
When SDL3 GPU isn't available (e.g. headless CI), the game falls back to a CPU software rasterizer. The GPU path is the default for normal builds.
Lighting
Up to 8 lights (directional / point / spot) are supported per frame. The first
shadow-casting directional light drives a PCF shadow map. Metals pick up an
ambient specular term so they aren't black in the absence of an environment
probe. See Components for the Light and
MeshRenderer components, and Assets & Materials for the
PBR material model.