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
use *;
/// Maximum internal optical framebuffer dimension (pixels) keeping 240/360/480Hz+ render time under 1.5 ms while scaling crisply to fullscreen.
pub const FLUID_RENDER_MAX_DIM: u32 = 640;
/// Minimum internal optical framebuffer dimension in pixels.
pub const FLUID_RENDER_MIN_DIM: u32 = 160;
/// Maximum internal scalar field grid width for metaball smoothing.
pub const FLUID_FIELD_MAX_W: usize = 216;
/// Maximum internal scalar field grid height for metaball smoothing.
pub const FLUID_FIELD_MAX_H: usize = 168;
/// Minimum internal scalar field grid dimension.
pub const FLUID_FIELD_MIN_DIM: usize = 64;
/// Lower scalar isosurface edge for sub-pixel anti-aliased free surface boundary.
pub const FLUID_ISO_LOW: f32 = 0.44;
/// Upper scalar isosurface edge for sharp glossy liquid boundary.
pub const FLUID_ISO_HIGH: f32 = 0.62;
/// Inverse water refractive index `1.0 / 1.333` for Snell's Law refraction.
pub const WATER_INV_IOR: f32 = 1.0 / WATER_REFRACTIVE_INDEX;
/// 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;
/// Beer-Lambert optical absorption coefficient for red channel (strongest absorption in pure water).
pub const BEER_LAMBERT_SIGMA_R: f32 = 2.35;
/// Beer-Lambert optical absorption coefficient for green channel (aqua transmission window).
pub const BEER_LAMBERT_SIGMA_G: f32 = 0.56;
/// Beer-Lambert optical absorption coefficient for blue channel (deepest sapphire transmission).
pub const BEER_LAMBERT_SIGMA_B: f32 = 0.22;
/// Parallel worker band height in output scanlines for native multi-threaded optical shading.
pub const FLUID_RENDER_BAND_ROWS: usize = 16;