Skip to main content

ocean_normal

Function ocean_normal 

Source
pub fn ocean_normal(pos: Vec2, time: f32, waves: &[OceanWave]) -> Vec3
Expand description

Compute the analytic surface normal of a Gerstner wave field.

Returns a unit normal pointing upward from the ocean surface.