Skip to content

Interface: LiquidMaskOptions

Liquid-mask configuration (rocky bodies with a surface liquid shell).

When provided, the fragment shader excludes submerged regions from per-fragment effects (cracks, lava) by replicating the CPU simplex3D elevation field through uLiquidPerm and comparing against seaLevel. Substance-agnostic — the same mask drives water, methane, nitrogen or any other caller-defined liquid.

Properties

permTexture

ts
permTexture: DataTexture;

512×1 UNSIGNED_BYTE permutation texture (see shaders/simplexPerm.ts).


seaLevel

ts
seaLevel: number;

Elevation threshold from BodySimulation.seaLevelElevation.


noiseScale

ts
noiseScale: number;

config.noiseScale — must match the CPU sampling frequency.


radius

ts
radius: number;

Body radius used to normalise object-space positions to the unit sphere.

Distribué sous la licence indiquée dans le dépôt.