MONKEY (presets): farclip ceiling 777 -> 1497 for Modern fog's longer view
FARCLIP_RANGE now ends at FARCLIP_MAX = 1497 (the 1.12 slider grid of 60 carried to n = 22), a documented deviation: Modern fog already stretches the fog end past 777 with farclip, so a longer view is visible. Terrain residency, the model/WMO and particle walls follow farclip; at 1497 residency is at most 7x7 ADT tiles against 777's 5x5, which is the memory bound. The art-scope sweep radius rises to 7 tiles to stay clear of the widest resident reach. Verified: cargo test -p benilla-world --lib (643 passed). Built on Linux only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Toc8dZYuTKW1JWBFbMb5S1
This commit is contained in:
@@ -17,8 +17,9 @@ use benilla_formats::TILE_SIZE;
|
||||
/// Real-clock seconds between sweeps (housekeeping, not world time); also the stamp's resolution.
|
||||
const SWEEP_SECS: f32 = 1.0;
|
||||
|
||||
/// Five ADT tiles (2667 yd), the smallest round tile multiple clear of [`radius_floor`].
|
||||
const DEFAULT_RADIUS_YD: f32 = 5.0 * TILE_SIZE;
|
||||
/// Seven ADT tiles (3733 yd), the smallest round tile multiple clear of [`radius_floor`]
|
||||
/// (MONKEY (presets): five until `farclip`'s ceiling rose past 777).
|
||||
const DEFAULT_RADIUS_YD: f32 = 7.0 * TILE_SIZE;
|
||||
|
||||
/// The far corner of the widest tile block the residency window keeps (at the `farclip` clamp's
|
||||
/// maximum), plus a tile: a stamp is where the viewer stood, so no smaller radius is safe.
|
||||
@@ -223,8 +224,8 @@ mod tests {
|
||||
"default {DEFAULT_RADIUS_YD} must clear the floor {}",
|
||||
radius_floor()
|
||||
);
|
||||
// (26 + 1 + 16) chunks each way at farclip 777, to the corner, plus a tile: ~2560 yd.
|
||||
assert!((radius_floor() - 2560.0).abs() < 1.0, "{}", radius_floor());
|
||||
// (47 + 1 + 16) chunks each way at farclip 1497, to the corner, plus a tile: ~3550 yd.
|
||||
assert!((radius_floor() - 3550.3).abs() < 1.0, "{}", radius_floor());
|
||||
}
|
||||
|
||||
/// `$WOW_ART_RADIUS` is unset in the test binary, as in every ordinary run.
|
||||
|
||||
@@ -75,8 +75,18 @@ pub struct ViewDistance {
|
||||
|
||||
/// The settable range of [`ViewDistance::farclip`]: the reference's `farclip` clamp,
|
||||
/// `[0x81021c]` = 177 to `[0x80fed8]` = 777 in its validate callback `0x688d40`; shared by the
|
||||
/// CVar apply, the options row and `$WOW_FARCLIP`.
|
||||
pub const FARCLIP_RANGE: std::ops::RangeInclusive<f32> = 177.0..=777.0;
|
||||
/// CVar apply, the options rows and `$WOW_FARCLIP`.
|
||||
///
|
||||
/// MONKEY (presets) deviation: the ceiling is [`FARCLIP_MAX`], not 777. Modern fog
|
||||
/// (`fog_model::modern_fog_end`) stretches the fog end past 777 with the view distance, so a
|
||||
/// longer view is visible rather than fogged; the residency window and the model/particle walls
|
||||
/// all follow `farclip`, and the ceiling is what bounds their memory (see [`FARCLIP_MAX`]).
|
||||
pub const FARCLIP_RANGE: std::ops::RangeInclusive<f32> = 177.0..=FARCLIP_MAX;
|
||||
|
||||
/// MONKEY (presets): the extended `farclip` ceiling — the reference's slider grid (177 + n·60)
|
||||
/// carried on to n = 22. The residency window there is ±47 chunks, at most 7×7 ADT tiles against
|
||||
/// 777's 5×5: about twice the reference maximum's terrain, doodads and WMOs, and no more.
|
||||
pub const FARCLIP_MAX: f32 = 1497.0;
|
||||
|
||||
/// The settable range of [`ViewDistance::nearclip`]: the bounds in the reference's `nearclip`
|
||||
/// change callback `0x688d90`, `[0x8029d0]` = 0.01 and `[0x808300]` = 0.33.
|
||||
|
||||
Reference in New Issue
Block a user