ludic/packages/ludic.render3d
Orkuncakilkaya d8300a7bf9 render3d(vulkan): GPU-driven trees - one merged mesh per material, one draw per material; on by default
Every level of a kit tree or rock carries the same materials, so a GPU-culled layer merges each
material's levels into one mesh (layer_arena_build) and scatter_cull.comp writes a record per
(material, level) naming that level's index and vertex range; one indirect draw covers them all.
A conifer's lit pass and prepass go from 8 draws to 2, its shadow LOD from 6 to 2. Layers that do
not fit (card levels, other materials or attributes, 32-bit indices) keep the CPU path.

GPU culling is now the Vulkan default (R3D_GPU_CULL=0 turns it off). Camp benchmark, 400 frames:
PC 2791 -> 2657 draws, 4.3 -> 4.1 s (both runs); Mac 2791 -> 2657, 8.0/7.4 -> 7.7/7.2 s.
Self-tests 59/59 on both machines, PC validation 0 errors; frames within run-to-run noise; OpenGL
frames unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 16:44:00 +03:00
..
shaders render3d(vulkan): GPU-driven trees - one merged mesh per material, one draw per material; on by default 2026-09-15 16:44:00 +03:00
actor.ludic perf(render3d): the sky light baked once at start, the terrain load in four steps, actor cull bounds by height 2026-09-15 15:03:06 +03:00
assets.manifest feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
camera.ludic feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
collide.ludic feat(render3d): replace the world at run time, water bodies, terrain_sea 2026-09-13 00:03:40 +03:00
daylight.ludic feat(render3d): load steps for a loading screen, four quality switches, and the ring's uniform usage 2026-09-15 14:46:55 +03:00
drawstats.ludic feat(render3d): R3D_DRAWSTATS - every draw a frame makes, by pass, program and kind 2026-09-15 14:39:33 +03:00
FEATURES.md feat: per-voice audio, outlines for what is not an actor, and a coast 2026-09-11 15:25:46 +03:00
fmath.ludic feat(render3d): gpu.ludic - the seam for a second graphics API, and what the GPU can do 2026-09-15 09:52:12 +03:00
gltf.ludic render3d(vulkan): GPU-driven trees - one merged mesh per material, one draw per material; on by default 2026-09-15 16:44:00 +03:00
gpu.ludic render3d(vulkan): MSAA - multisampled renderbuffers, resolved in a draw-less pass 2026-09-15 16:21:52 +03:00
gpu_manifest.ludic feat(render3d): read the SPIR-V manifest the way a Vulkan backend will 2026-09-15 10:41:43 +03:00
gpu_vk.ludic perf(render3d): Vulkan device memory in blocks, and a shadow map that survives running out of it 2026-09-15 15:44:21 +03:00
gpu_vk_draw.ludic render3d(vulkan): MSAA - multisampled renderbuffers, resolved in a draw-less pass 2026-09-15 16:21:52 +03:00
gpu_vk_res.ludic render3d(vulkan): MSAA - multisampled renderbuffers, resolved in a draw-less pass 2026-09-15 16:21:52 +03:00
grass.ludic refactor(render3d): programs, GPU timers and the context behind gpu.ludic 2026-09-15 11:33:01 +03:00
mesh.ludic perf(render3d): Vulkan draws find pipelines by integer and reuse descriptor sets 2026-09-15 13:22:51 +03:00
overlay.ludic refactor(render3d): programs, GPU timers and the context behind gpu.ludic 2026-09-15 11:33:01 +03:00
package.ludic feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
post.ludic render3d(vulkan): MSAA - multisampled renderbuffers, resolved in a draw-less pass 2026-09-15 16:21:52 +03:00
prof.ludic feat(render3d): R3D_DRAWSTATS - every draw a frame makes, by pass, program and kind 2026-09-15 14:39:33 +03:00
programs.ludic refactor(render3d): programs, GPU timers and the context behind gpu.ludic 2026-09-15 11:33:01 +03:00
quat.ludic feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
r3d.ludic feat(render3d): R3D_DRAWSTATS - every draw a frame makes, by pass, program and kind 2026-09-15 14:39:33 +03:00
render.ludic perf(render3d): the sky light baked once at start, the terrain load in four steps, actor cull bounds by height 2026-09-15 15:03:06 +03:00
scatter.ludic render3d(vulkan): GPU-driven trees - one merged mesh per material, one draw per material; on by default 2026-09-15 16:44:00 +03:00
shadow.ludic perf(render3d): Vulkan device memory in blocks, and a shadow map that survives running out of it 2026-09-15 15:44:21 +03:00
skin.ludic refactor(render3d): vertex data and draws behind gpu.ludic 2026-09-15 10:21:55 +03:00
sky.ludic perf(render3d): the sky light baked once at start, the terrain load in four steps, actor cull bounds by height 2026-09-15 15:03:06 +03:00
stream.ludic feat(render3d): load steps for a loading screen, four quality switches, and the ring's uniform usage 2026-09-15 14:46:55 +03:00
terrain.ludic perf(render3d): the sky light baked once at start, the terrain load in four steps, actor cull bounds by height 2026-09-15 15:03:06 +03:00
texture.ludic feat(render3d): texture filtering and shadow resolution a game can change while it runs 2026-09-15 14:25:55 +03:00
water.ludic refactor(render3d): programs, GPU timers and the context behind gpu.ludic 2026-09-15 11:33:01 +03:00