MONKEY (fog): tune Modern after captures; fog-vista scenarios; consume-set allow-list

Sun-fog strength 0.25 / angle 0.4 / lean 0.4, end-fog lean 0.25: the first
pass turned dusk ridges into flat orange cut-outs against a blue sky. The
dome's low band now MIXES toward the far fog colour by 15 deg (an offset
over-pushed an already warm dusk ring). update_fog_model joins the
ordering test's ALLOWED list (it runs in the resolve set, after it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pkuzic
2026-09-25 10:43:03 +01:00
co-authored by Claude Opus 5.5
parent 64699c9660
commit 2bf925678d
4 changed files with 30 additions and 7 deletions
@@ -1389,6 +1389,23 @@ pub(super) const ON_DEMAND: &[Scenario] = &[
minute: 720,
ui: None,
},
// MONKEY (fog): a long Elwynn vista from the Northshire ridge south over Goldshire's forest.
Scenario {
name: "fog-vista-noon",
map: Some(MAP_AZEROTH),
eye: [-9000.0, -100.0, 200.0],
look: [-9500.0, -100.0, 90.0],
minute: 720,
ui: None,
},
Scenario {
name: "fog-vista-dusk",
map: Some(MAP_AZEROTH),
eye: [-9000.0, -100.0, 200.0],
look: [-9500.0, -100.0, 90.0],
minute: 1170,
ui: None,
},
Scenario {
name: "fog-duskwood-dusk",
map: Some(MAP_AZEROTH),
@@ -99,7 +99,8 @@ fn fog_modern_survival(span: vec2<f32>, d: f32, world_y: f32, height_row: vec4<f
// MONKEY (fog): the sky dome's low band under Modern. `col` is the dome's own colour at `dir`,
// `horizon_rgb` the colour it uses at 0° (the scene fog colour); the far fog colour along `dir`
// replaces the horizon and eases into the dome's gradient over the first 12° of elevation.
// replaces the horizon and eases into the dome's own gradient by 15° of elevation (a mix, never an
// offset, so an already warm dusk ring is not pushed past itself).
// Classic returns `col` untouched.
fn fog_sky_horizon(
col: vec3<f32>,
@@ -114,8 +115,8 @@ fn fog_sky_horizon(
}
let far = fog_modern_colour(horizon_rgb, dir, 1.0e9, sun_row, end_row, sel_row);
let elev = asin(clamp(dir.y, -1.0, 1.0));
let w = 1.0 - smoothstep(0.0, 0.20943951, elev);
return clamp(col + (far - horizon_rgb) * w, vec3<f32>(0.0), vec3<f32>(1.0));
let w = 1.0 - smoothstep(0.0, 0.26179939, elev);
return mix(col, far, w);
}
// The fog a surface stands in: rgb = the fog colour, w = how much of the surface survives (1 = no
@@ -90,12 +90,12 @@ pub fn modern_fog_end(fog_end_raw: f32, fog_start_frac: f32, farclip: f32) -> (f
}
/// Sun-fog lobe defaults (no `LightFogBand` row): strength and the cosine the lobe starts at.
pub const DERIVED_SUN_FOG_STRENGTH: f32 = 0.5;
pub const DERIVED_SUN_FOG_ANGLE: f32 = 0.25;
pub const DERIVED_SUN_FOG_STRENGTH: f32 = 0.25;
pub const DERIVED_SUN_FOG_ANGLE: f32 = 0.4;
/// How far the sun-fog colour leans from the fog colour toward the sun colour (IntBand 9).
const DERIVED_SUN_FOG_LEAN: f32 = 0.6;
const DERIVED_SUN_FOG_LEAN: f32 = 0.4;
/// How far the end-fog colour leans from the fog colour toward the 1.8° sky ring.
const DERIVED_END_FOG_LEAN: f32 = 0.5;
const DERIVED_END_FOG_LEAN: f32 = 0.25;
fn mix3(a: [f32; 3], b: [f32; 3], t: f32) -> [f32; 3] {
[
+5
View File
@@ -407,6 +407,11 @@ mod ordering_tests {
"the celestial follows: PostUpdate, BillboardPlace",
),
("weather/precip/mod.rs", "push_precip: PostUpdate"),
// MONKEY (fog)
(
"lighting/fog_model.rs",
"update_fog_model: in the resolve set, .after(update_time_lighting)",
),
// MONKEY (daylight fixtures / portal bleed): both systems are PostUpdate,
// chained before `global_light::classify_light_lanes`.
(