Technical Reference
From platform abstraction to GPU-driven visibility buffer rendering: every layer of the Kapi Engine runtime.
Engine Overview
Renderer Deep-Dive
The main scene render graph compiles a DAG of passes into execution segments across Graphics, Compute, and PostGraphics lanes.
Visibility Buffer
Every pixel stores a single uint32 encoding the draw call, triangle, and meshlet that produced it.
Data Flow
Reference
| Pass | Kind | Queue | Description |
|---|---|---|---|
MeshletCull | Compute | Async | Frustum + Hi-Z occlusion + backface culling, builds indirect args |
VisibilityPass | Graphics | Main | GPU-driven meshlet draw, writes VisBuffer + depth |
ProcessVisibility | Compute | Async | Decode VisBuffer, material tile classification |
AttributeInterpolation | Compute | Async | Barycentric reconstruction, vertex attribute fetch |
DeferredTexturing | Compute | Async | Bindless material/texture evaluation per tile |
RasterShadowMap | Graphics | Main | Cascaded directional + per-light raster shadow maps |
RtShadows | Compute | Main | Hardware ray-traced shadow rays, fed into denoise |
Tlrc | Compute | Main | Temporal Light Radiance Cache: screen probes + reprojection |
Ddgi | Compute | Main | Dynamic Diffuse Global Illumination probe-grid update + sample |
RtxdiResTIR | Compute | Main | RTXDI ReSTIR direct illumination + path-tracing modes |
DeferredLighting | Compute | Main | PBR lighting from material outputs → scene color (HDR) |
RtReflections | Compute | Main | Hardware RT reflections with temporal stabilization |
RasterSsr | Compute | Async | Screen-space reflections fallback path |
NrdDenoise | Compute | Main | REBLUR/RELAX denoising of RT shadows + reflections + GI |
Gtao | Compute | Async | Ground-truth ambient occlusion |
Cmaa2 | Compute | Async | Conservative morphological anti-aliasing |
TemporalAa | Compute | Main | Halton-jittered TAA with neighborhood clamp |
DlssSr | Compute | Main | NVIDIA DLSS Super Resolution / DLAA |
DlssRr | Compute | Main | NVIDIA DLSS Ray Reconstruction (denoise + upscale) |
DlssFg | Compute | Main | NVIDIA DLSS Frame Generation |
Fsr3Fg | Compute | Main | AMD FidelityFX FSR3 Frame Generation |
Tonemap | Compute | Main | ACES / Reinhard / Khronos PBR Neutral; PQ for HDR10 |
EditorOverlay | Graphics | Main | Gizmos, selection outlines, grid |
ImGuiComposite | Graphics | Main | Editor UI composite |
PresentCopy | Copy | Main | Final resolve to swapchain |
Material System
| Flag | Bit | Purpose |
|---|---|---|
HasAlbedoTexture | 0 | Base color texture bound |
HasNormalTexture | 1 | Normal map bound |
HasRoughnessTexture | 2 | Roughness map bound |
HasMetallicTexture | 3 | Metallic map bound |
HasEmissiveTexture | 4 | Emissive map bound |
HasAoTexture | 5 | Ambient occlusion map bound |
AlphaBlend | 6 | Alpha blending enabled |
NoDepthWrite | 7 | Disable depth writes |