From e970cedcf2c0510583e51151b5d01a14392da493 Mon Sep 17 00:00:00 2001
From: pkuzic
Date: Fri, 25 Sep 2026 21:53:25 +0100
Subject: [PATCH] MONKEY (followups): refresh the streamed shadow cache without
volumetric fog
The static world caster rebuilds only on 16 yd of camera drift. The refresh that invalidates it
when streamed geometry arrives lived in the volumetric-fog plugin and was gated on that cvar, so
with volumetricFog 0 a standing camera never picked up trees and doodads that streamed in late.
The refresh now lives in world_shadow.rs and is gated on worldShadows only (Classic unaffected).
Co-Authored-By: Claude Opus 5.5
---
crates/benilla-app/src/volumetric_fog.rs | 48 +-------------------
crates/benilla-app/src/world_shadow.rs | 56 ++++++++++++++++++++++--
2 files changed, 55 insertions(+), 49 deletions(-)
diff --git a/crates/benilla-app/src/volumetric_fog.rs b/crates/benilla-app/src/volumetric_fog.rs
index b5753771..2d608273 100644
--- a/crates/benilla-app/src/volumetric_fog.rs
+++ b/crates/benilla-app/src/volumetric_fog.rs
@@ -5,11 +5,9 @@
use crate::{
shadow_core::{ShadowSet, ShadowSun},
video::VideoConfig,
- world_shadow::WorldLane,
};
use benilla_world::{
lighting::{ResolvedPointLight, ResolvedPointLights, WorldTime, WowLighting},
- static_gx::StaticGx,
view::WorldCamera,
weather::WeatherState,
wmo_portal::CameraInteriorClaim,
@@ -119,7 +117,8 @@ impl Plugin for VolumetricFogPlugin {
shaft_gain,
})
.add_plugins(ExtractComponentPlugin::::default())
- .add_systems(Last, refresh_streamed_shadows.before(ShadowSet::Lanes))
+ // MONKEY (followups): the streamed-caster refresh moved to `world_shadow.rs`; it no longer
+ // depends on this cvar.
.add_systems(Last, update_fog.after(ShadowSet::Lanes));
// Keep headless policy tests independent of the renderer.
if !app.is_plugin_added::() {
@@ -149,27 +148,6 @@ impl Plugin for VolumetricFogPlugin {
}
}
-// The legacy caster cache otherwise misses streamed trees at a stationary camera.
-// Off must leave even this old cache behaviour untouched for the exact baseline.
-fn refresh_streamed_shadows(
- video: Res,
- override_value: Res,
- gx: Option>,
- mut lane: ResMut,
- mut seen: Local