v0.12.0
·
371 commits
to master
since this release
Performance
- Arc-backed surface submission:
SurfaceSubmission::Flatnow holdsArc<[SceneRenderItem]>instead ofVec; per-frame cost for a static scene drops from a full deep-copy (~150 MB/frame at 1M objects) to a single atomic refcount increment. NewSceneFrame::from_shared_itemsconstructs a frame directly from a caller-ownedArcwith no allocation. - Async scene build: large scene construction runs on a background thread; the UI thread stays live during the build. Completion is delivered via
mpsc::channel::try_recv. ALoadingBarItemoverlay drives a live progress bar fed by anArc<AtomicU32>counter incremented every 10 000 objects. - Parallel BVH construction:
build_bvh_nodeusesrayon::joinfor subtrees above 1 024 entries, cutting build time ~8x on multi-core hardware (~3 s -> ~400 ms for 1M objects)
Features
- GPU-driven culling: compute cull pass replaces the CPU BVH instanced culling path
cull_instancescompute shader tests per-instance world-space AABBs against the camera frustum; visible instances are compacted into a visibility index buffer via atomic slot claimswrite_indirect_argscompute shader writes oneDrawIndexedIndirectentry per batch and resets atomic counters for the next frame- Main pass and OIT pass use
draw_indexed_indirect; vertex shaders read through the visibility index buffer via avs_main_cullentry point - Shadow cascade extension: each cascade gets its own GPU cull dispatch (per-cascade frustum, per-cascade visibility buffer) and indirect draw; the CPU per-item frustum loop in the instanced shadow path is replaced
- Automatic activation: GPU culling is on by default when the device supports
INDIRECT_FIRST_INSTANCE; silent fallback to direct draw on devices that do not disable_gpu_driven_culling()/enable_gpu_driven_culling()runtime toggle onViewportRendererFrameStats::gpu_culling_active: reports which draw path ran each frame
- Showcase 3 (Performance at Scale): live GPU culling toggle, full
FrameStatsreadout (CPU/GPU timings, culled count, draw path, render scale, upload bytes)