1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! The ground-cover model's shared numbers and the scheduling that turns clock time into kernel
//! steps. The kernels' equations are in `snow.wesl` and `shelter.wesl`; `mirror.rs` is their CPU
//! transliteration used by the tests.
/// Snow depth at which the ground reads as fully covered, m.
pub const FULL_COVER_DEPTH_M: f32 = 0.05;
/// The longest game time one kernel step integrates, s.
pub const MAX_STEP_S: f64 = 600.0;
/// The most steps one frame runs; a clock jump that needs more is cut.
pub const MAX_STEPS_PER_FRAME: u32 = 144;
/// The longest game time kept waiting for the GPU, s (`weathering.rs` clamps to 24 h too).
pub const MAX_PENDING_S: f64 = 86_400.0;
/// Largest cover readback edge: a larger simulation grid is box-averaged down by 2 first.
pub const READBACK_MAX_CELLS: u32 = 1024;
/// How far from the camera the map is averaged into `SurfaceWeathering`, m.
pub const SURFACE_WEATHERING_RADIUS_M: f32 = 50.0;
/// Hermite smoothstep.
pub
/// Fraction of the ground under snow of `depth_m`: `smoothstep(0, 0.05, d)`.
pub
/// How many kernel steps `pending_s` of game time needs and how long each is: steps of at most
/// [`MAX_STEP_S`], never more than [`MAX_STEPS_PER_FRAME`]. `None` for no time.
pub
/// A quantised value for change detection: the shelter mask is rebuilt only when the fall
/// directions move by more than a step.
pub