ludic/packages/ludic.render3d
Orkuncakilkaya ef745a141d render3d: the water reflection runs only when mirrored water can be on screen; an actor census
The reflection pass is a second copy of the terrain, the vegetation and the actors, and it ran on
every frame of a map with water - looking straight down at a meadow included. The mirrored body is cut
into rectangles where the ground lies below it (32 m over the height map in 8 x 8 blocks, the sea
beyond it coarse), and the pass runs when one meets the view frustum and its water is not all dry
where it shows, outside the frame or behind the ground. Three wrong turns on the way, each kept in a
comment: bounding spheres (a 156 m cell reached into the view from behind the camera), sight lines
that never asked whether the point was in the frame, and a walk of every rectangle every frame (0.1 s
per 400 frames on the PC until the blocks). Built once in 6.6 ms.

Mac, the five shot viewpoints: view c (the meadow) 225 reflection draws -> none; a, b, d, e unchanged;
OpenGL frames byte-identical; self-tests 59/59 on OpenGL and Vulkan; MoltenVK validation adds nothing.
PC camp (lake in view): 1882 draws either way, 3.8 s for 400 frames either way, three runs each,
self-tests 59/59, validation 0. R3D_REFL_ALWAYS=1 runs the pass every frame; R3D_REFL_DBG=1 prints the
test once.

R3D_ACTOR_CENSUS=<frame> prints the lit pass's actors grouped by model: town is 17 models and 69 draws,
and only four rigid models repeat (17 actors) - too little for instancing to be worth a shader variant.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 17:38:08 +03:00
..
shaders render3d(vulkan): the ground reads the sun cascades itself - no separate terrain sun pass 2026-09-15 17:26:39 +03:00
actor.ludic render3d: the water reflection runs only when mirrored water can be on screen; an actor census 2026-09-15 17:38:08 +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: grass in chunks of 256 tiles a draw, flower casters only into the cascades they reach 2026-09-15 16:58:53 +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 render3d: grass in chunks of 256 tiles a draw, flower casters only into the cascades they reach 2026-09-15 16:58:53 +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 render3d: HUD text, panels and images share a draw - the font stays bound and each vertex says what it reads 2026-09-15 17:14:53 +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 render3d: the water reflection runs only when mirrored water can be on screen; an actor census 2026-09-15 17:38:08 +03:00
scatter.ludic render3d: grass in chunks of 256 tiles a draw, flower casters only into the cascades they reach 2026-09-15 16:58:53 +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 render3d(vulkan): the ground reads the sun cascades itself - no separate terrain sun pass 2026-09-15 17:26:39 +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 render3d: the water reflection runs only when mirrored water can be on screen; an actor census 2026-09-15 17:38:08 +03:00