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

@ -431,7 +431,7 @@ function gvk_mem_new(render3d_st: mut Render3dState, req: bytes, want: int, imag
let span = (size + align - 1) / align * align
# an impostor atlas has memory of its own: a fog wall lets it go (fog_impostors.ludic), and inside a
# shared block its room went back to nobody while the block's other tenants stayed
if size <= gvk_own_over(render3d_st) and render3d_st.gvk_tag != VKM_IMPOSTOR {
if size <= gvk_own_over(render3d_st) and render3d_st.gvk_tag != VKM_IMPOSTOR and render3d_st.gvk_tag != VKM_SHADOW {
var kind = t * 2
if image { kind += 1 }
var i = 0