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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
use *;
/// Minimum internal optical framebuffer dimension in pixels.
pub const FLUID_RENDER_MIN_DIM: u32 = 160;
/// Hardware safety upper bound per axis for native 1:1 physical optical fluid surfaces (`16384px`, lossless up to 16K).
pub const FLUID_RENDER_MAX_DIM: u32 = 16_384;
/// Minimum explicit user-configured optical resolution scale multiplier (`0.25x`).
pub const FLUID_MIN_RESOLUTION_SCALE: f32 = 0.25;
/// Maximum explicit user-configured optical resolution scale multiplier (`2.0x` supersampling).
pub const FLUID_MAX_RESOLUTION_SCALE: f32 = 2.0;
/// Default lossless optical resolution scale multiplier (`1.0x` native 1:1 physical pixels).
pub const FLUID_DEFAULT_RESOLUTION_SCALE: f32 = 1.0;
/// Pre-baked spherical primary storm-cloud sky LUT width in texels.
pub const SKY_LUT_W: usize = 384;
/// Pre-baked spherical primary storm-cloud sky LUT height in texels.
pub const SKY_LUT_H: usize = 192;
/// Pre-baked hemi-octahedral 360-degree ocean-reflection sky LUT width in texels.
pub const REFL_LUT_W: usize = 80;
/// Pre-baked hemi-octahedral 360-degree ocean-reflection sky LUT height in texels.
pub const REFL_LUT_H: usize = 80;
/// Cloud drift interval in seconds between amortized spherical sky LUT refreshes (`12.5 Hz`).
pub const SKY_LUT_REFRESH_INTERVAL_SECS: f32 = 0.08;
/// Number of entries in the L1-resident ACES filmic + sRGB gamma LUT (`0..=1024`).
pub const ACES_LUT_SIZE: usize = 1025;
/// Rational hyperbolic knee mapping linear HDR radiance `[0, inf)` onto `[0, 1]` for the ACES+sRGB LUT.
pub const ACES_LUT_KNEE: f32 = 0.38;
/// Reciprocal of `pi / 2` (`2 / pi`) for fast branchless polynomial `fast_sin_cos` range reduction.
pub const FAST_TRIG_INV_HALF_PI: f32 = 2.0 / PI;
/// Half-pi (`pi / 2`) for fast branchless polynomial `fast_sin_cos` range reduction.
pub const FAST_TRIG_HALF_PI: f32 = FRAC_PI_2;
/// Maximum internal scalar field grid width for PBF interactive wake extraction.
pub const FLUID_FIELD_MAX_W: usize = 128;
/// Maximum internal scalar field grid height for PBF interactive wake extraction.
pub const FLUID_FIELD_MAX_H: usize = 96;
/// Minimum internal scalar field grid dimension.
pub const FLUID_FIELD_MIN_DIM: usize = 48;
/// Schlick Fresnel base normal-incidence reflectance for air-water (`((1.333 - 1) / (1.333 + 1))^2 ≈ 0.0204`).
pub const WATER_FRESNEL_F0: f32 = 0.0204;
/// Parallel worker band height in output scanlines for native multi-threaded optical shading.
pub const FLUID_RENDER_BAND_ROWS: usize = 16;
/// Perspective camera focal length matching a natural ~50mm cinematic ocean lens.
pub const OCEAN_CAMERA_FOCAL: f32 = 1.62;
/// Perspective camera height above mean ocean surface in meters.
pub const OCEAN_CAMERA_HEIGHT_M: f32 = 1.42;
/// Default normalized screen Y coordinate of the open-sea horizon (`54.5%` from top).
pub const OCEAN_HORIZON_V: f32 = 0.545;
/// Sun azimuth X offset in camera ray space placing the sun slightly left of center.
pub const OCEAN_SUN_RAW_X: f32 = -0.30;
/// Sun elevation Y component in camera ray space placing the sunlit golden-day sun cleanly above the horizon mist.
pub const OCEAN_SUN_RAW_Y: f32 = 0.205;
/// Sun depth Z component in camera ray space.
pub const OCEAN_SUN_RAW_Z: f32 = 1.62;
/// Eight multi-scale irrational-angle isotropic Gerstner-trochoidal ocean wave trains `(dir_x, dir_z, freq, amp, speed)` tuned for crisscrossing glassy emerald swells and organic broken sun-glitter ripples.
pub const OCEAN_WAVE_SPECTRUM: = ;
/// Total number of 3D origami paper boat triangles projected per frame.
pub const BOAT_TRI_COUNT: usize = 16;
/// Number of 3D vertices defining the symmetric watertight folded origami paper boat mesh.
pub const BOAT_VERT_COUNT: usize = 15;
/// Local 3D origami paper boat vertices `[x_length, y_up, z_camera]` in meters (`-z` faces the camera).
pub const BOAT_LOCAL_VERTS: = ;
/// Origami paper boat triangle index list `(i0, i1, i2, facet_kind)` where `facet_kind`: `0=outer_left`, `1=center_flap_left`, `2=sail_left`, `3=inner_cavity`, `4=outer_right`, `5=sail_right`, `6=center_flap_right`.
pub const BOAT_TRIANGLES: = ;
/// Luminance threshold above which HDR sun and wave glitter radiance enters the quarter-res optical bloom buffer.
pub const OCEAN_BLOOM_THRESHOLD: f32 = 1.35;
/// Camera horizon vertical damping rate in Hertz decoupling ocean horizon pitch from transient PBF particle slosh.
pub const FLUID_CAM_HORIZON_DAMP_HZ: f32 = 2.5;
/// Maximum gentle steady-state fill-level horizon offset (`±0.012` normalized height) preventing particle bounce from shaking the horizon.
pub const FLUID_CAM_MAX_FILL_SHIFT: f32 = 0.012;
/// Camera horizon roll damping rate in Hertz for smooth dt-invariant gyroscope and virtual-tilt horizon tracking.
pub const FLUID_CAM_ROLL_DAMP_HZ: f32 = 7.5;
/// Camera roll angular deadband in radians suppressing handheld MEMS accelerometer micro-tremor on the horizon.
pub const FLUID_CAM_ROLL_DEADBAND_RAD: f32 = 0.0015;
/// Ocean wave agitation damping rate in Hertz preventing transient PBF velocity spikes from twitching wave heights and boat heave.
pub const FLUID_CAM_AGITATION_DAMP_HZ: f32 = 3.5;
/// Sailboat horizontal and angular sway damping rate in Hertz isolating the rendered boat from 60Hz PBF particle impact jitter.
pub const FLUID_CAM_BOAT_SWAY_DAMP_HZ: f32 = 6.0;