render3d: the shadow array holds only the cascades a fog wall needs, and a thick fog takes the whole sky

A cascade that begins past the wall was fitted and cleared every frame for nothing: the array is now
made with the ones that begin inside it (2 at 30 m, 3 at 175 m, 5 without a fog) and made again when
the wall changes that count; shadow maps 80 -> 32 MB at 30 m, 48 MB at 175 m. A layer the array lacks
clamps to its last, read only past the wall where everything is fogged.

The sky: at walls of 110 m and nearer the whole sky is the fog's colour, overhead too, with a soft
glow at the sun or moon and no stars or clouds through it, easing out by 175 m; from 175 m on the
horizon band alone, and off as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-29 16:10:58 +03:00
parent 7024f42789
commit 4d485a1778
6 changed files with 40 additions and 3 deletions

View file

@ -199,6 +199,7 @@ export state Render3dState {
gvk_al_tag: []int = null # per allocation id: owner * 4 + image * 2 + host (vkmem_report.ludic)
gvk_tag: int = 0 # the owner allocations are made for now (VKM_*)
vkmem_at: int = 0 # R3D_VKMEM=<frame>: the report is printed at that frame
sh_layers: int = 5 # the shadow array's layers: the cascades the fog wall needs (shadow_fog)
fog_imp_released: int = 0 # impostor atlases let go under a fog wall (fog_impostors.ludic)
fog_imp_rebaked: int = 0
fog_imp_rebake_us: int = 0