Skip to main content

sample_combined_water_surface

Function sample_combined_water_surface 

pub fn sample_combined_water_surface(
    spectrum: &SimdGerstnerSpectrum,
    ripple: &InteractiveRippleBuffer,
    x: f32,
    z: f32,
    t: f32,
) -> (f32, [f32; 3])
Expand description

Combines an analytical Gerstner wave spectrum with a local dynamic interactive ripple buffer.

Returns the combined surface elevation and normalized surface normal (height, [nx, ny, nz]).