feat(render3d): compute and indirect draws on Vulkan, and tree layers culled on the GPU (opt-in)
- Device: multiDrawIndirect, drawIndirectFirstInstance and drawIndirectCount where present. - Buffers carry storage and indirect usage; a GPU-owned buffer is never swapped under a draw. - Compute programs from shaders/compute.list (binding 0 parameters, 1.. storage buffers), built by `ludic-dev shaders`; gpu_compute / gpu_dispatch / gpu_draw_mesh_indirect in gpu.ludic. - R3D_VK_PROBE=1: a dispatch read back (OK on the RTX 3070 Ti). - scatter_cull.comp: a tree layer's frustum test and LOD split on the GPU, with the lit, prepass, impostor and shadow-LOD draws reading its records. Behind R3D_GPU_CULL=1 and off by default: at the camp it is slower (43.0 fps against 53.3), because the frame's cost is per-draw descriptor sets and it adds empty-level draws. Validation-clean; OpenGL frames unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
04cda22d19
commit
c1eb5f399f
11 changed files with 463 additions and 15 deletions
4
packages/ludic.render3d/shaders/compute.list
Normal file
4
packages/ludic.render3d/shaders/compute.list
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# compute.list - render3d's compute programs: name|file.comp. Built by `ludic-dev shaders` into
|
||||
# spv/<name>.comp.spv. Binding 0 is the uniform block of parameters, 1.. storage buffers.
|
||||
probe|probe.comp
|
||||
scatter_cull|scatter_cull.comp
|
||||
Loading…
Add table
Add a link
Reference in a new issue