eulerjs API / @eulerjs/marine/webgpu / createSpectralWaterMaterial
createSpectralWaterMaterial()
ts
function createSpectralWaterMaterial(
fields,
vertex,
options?
): SpectralWaterMaterial;Defined in: packages/marine/src/webgpu/waterMaterial.ts:94
The material of a SpectralWater: each vertex moved by every patch's displacement, each sampled at the mip level of the vertex spacing so that waves too short for the mesh fade out of it instead of aliasing; each pixel lit with the slopes of every wave, mipmapped too, and foam where GpuWaveFields keeps it.
Parameters
| Parameter | Type |
|---|---|
fields | GpuWaveFields |
vertex | WaterVertex |
options? | SpectralWaterMaterialOptions |
