Skip to main content

Module spectral_basis

Module spectral_basis 

Source
Expand description

Continuous EMF spectral basis functions (Jakob-Hanika), closed-form Gaussian moments, and wave optics. Continuous EMF spectral basis functions (Jakob-Hanika), closed-form Gaussian moments, and wave optics.

Structs§

AtmosphericCrossSections
Atmospheric and volumetric scattering and extinction cross-sections for a 4-lane hero packet.
JakobHanikaCoeffs
3-component polynomial spectral basis coefficients for Jakob & Hanika (2019) representation.
SpectralGBuffer0Record
G-Buffer 0: 64-bit float allocation (c0, c1, c2 in f16, roughness in f16).
SpectralGBuffer1Record
G-Buffer 1: 32-bit packed allocation (Octahedral Normal Nx, Ny, Metallic, MaterialFlags).
WymanCmf
Analytical Gaussian approximation of CIE 1931 CMFs (Wyman et al. 2013).

Constants§

AGX_INSET_MATRIX
AgX / Manuka 20% linear gamut inset matrix for pre-compression desaturation.
AGX_OUTSET_MATRIX
Inverse outset matrix restoring midtone saturation.
GOLDEN_RATIO_CONJUGATE
LAMBDA_MAX_NM
LAMBDA_MIN_NM
LAMBDA_SPAN_NM

Functions§

agx_manuka_gamut_inset
Apply AgX / Manuka linear gamut inset toward white point.
agx_manuka_gamut_outset
Apply AgX / Manuka inverse outset restoring midtone saturation.
burley_diffusion_weights_simd4
Christensen-Burley Normalized Diffusion BSSRDF weights for subsurface scattering.
evaluate_emf_gaussian_moment_transport
Exact closed-form Gaussian moments light transport.
evaluate_spectral_reflectance
Evaluate continuous spectral reflectance $R(\lambda) \in [0.0, 1.0]$ from basis coefficients.
evaluate_spectral_reflectance_simd4
Vectorized 4-lane SIMD evaluation matching WGSL vec4<f32> Hero Wavelength Sampling.
evaluate_volumetric_cross_sections_simd4
Evaluate Rayleigh, Mie, and Ozone atmospheric cross-sections continuously across the 4 hero wavelengths.
evaluate_wyman_cmf
Evaluate Wyman et al. (2013) analytical CMFs across the 4 hero wavelengths.
generate_hero_wavelength_packet
Generate 4 stratified hero wavelengths from blue noise and temporal frame index.
normalize_wavelength
Normalize wavelength $\lambda \in [380.0, 780.0]\text{ nm}$ to $u \in [0.0, 1.0]$.
spectral_to_cie_xyz_simd4
Integrate a 4-lane spectral radiance packet into linear CIE XYZ tristimulus values.
thin_film_airy_simd4
Continuous thin-film wave interference via unpolarized Airy formulation over 4 hero wavelengths.