euv-core 0.48.1

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Maximum internal optical framebuffer dimension (pixels) delivering crisp HiDPI rendering while keeping frame time bounded.
pub const FLUID_RENDER_MAX_DIM: u32 = 960;

/// Minimum internal optical framebuffer dimension in pixels.
pub const FLUID_RENDER_MIN_DIM: u32 = 160;

/// Maximum internal optical pixel budget on native multi-threaded targets (`960 x 540`).
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const FLUID_RENDER_MAX_PIXELS: f32 = 960.0 * 540.0;

/// Maximum internal optical pixel budget on single-threaded WebAssembly (`800 x 480`).
#[cfg(target_arch = "wasm32")]
pub(crate) const FLUID_RENDER_MAX_PIXELS: f32 = 800.0 * 480.0;

/// Maximum internal scalar field grid width for metaball smoothing.
pub(crate) const FLUID_FIELD_MAX_W: usize = 216;

/// Maximum internal scalar field grid height for metaball smoothing.
pub(crate) const FLUID_FIELD_MAX_H: usize = 168;

/// Minimum internal scalar field grid dimension.
pub(crate) const FLUID_FIELD_MIN_DIM: usize = 64;

/// Lower scalar isosurface edge for sub-pixel anti-aliased free surface boundary.
pub(crate) const FLUID_ISO_LOW: f32 = 0.44;

/// Upper scalar isosurface edge for sharp glossy liquid boundary.
pub(crate) const FLUID_ISO_HIGH: f32 = 0.62;

/// Inverse water refractive index `1.0 / 1.333` for Snell's Law refraction.
pub(crate) 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(crate) const WATER_FRESNEL_F0: f32 = 0.0204;

/// Beer-Lambert optical absorption coefficient for red channel (strongest absorption in pure water).
pub(crate) const BEER_LAMBERT_SIGMA_R: f32 = 2.35;

/// Beer-Lambert optical absorption coefficient for green channel (aqua transmission window).
pub(crate) const BEER_LAMBERT_SIGMA_G: f32 = 0.56;

/// Beer-Lambert optical absorption coefficient for blue channel (deepest sapphire transmission).
pub(crate) const BEER_LAMBERT_SIGMA_B: f32 = 0.22;

/// Parallel worker band height in output scanlines for native multi-threaded optical shading.
pub(crate) const FLUID_RENDER_BAND_ROWS: usize = 16;