# OceanWaveMask

> Talos next · Since 0.6

A painted scale on the waves over a world rectangle (a calm harbour, a rough patch).

It scales wave height, sideways motion, foam and roughness; the CPU sea reads the same texels. Invalid values are `ocean-wave-mask-range-invalid`.

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `asset` | `string` | yes |  |  | A `texture` asset: a greyscale PNG (8 or 16 bit; a 16-bit file uses its high byte). Texel value 128 is a scale of exactly 1, 0 is `minScale`, 255 is `maxScale`, linear between; row 0 is at the smallest z. A missing asset is `ocean-wave-mask-asset-missing`; an asset that is not a .png texture (or a PNG that is not greyscale) is `ocean-wave-mask-not-greyscale`. |
| `originXz` | `Vec2` | yes |  |  | World x and z of the raster's minimum corner, metres. |
| `sizeM` | `Vec2` | yes |  |  | World size the raster covers along x and z, metres; both above 0. Outside it the scale is exactly 1, so paint the border 128. |
| `minScale` | `number` | no |  |  | Wave scale of texel value 0, 0..1. Default 0 (flat). |
| `maxScale` | `number` | no | `2` |  | Wave scale of texel value 255, 1..4. Default 2. |

## See also

- `Vec2`
