Skip to main content

Class: WaterOptics

Per-frame driver of the camera's underwater state. Smooths submersion and depth across the waterline, and derives the ambient water color, sky fade, and near-camera light filter that the renderer uniforms consume.

Constructors​

constructor​

• new WaterOptics(): WaterOptics

Returns​

WaterOptics

Properties​

ambientColor​

• Readonly ambientColor: Color


depth​

• depth: number = 0


lightFilter​

• Readonly lightFilter: Color


skyFade​

• skyFade: number = 0


submersion​

• submersion: number = 0


viewExtinctionScale​

• viewExtinctionScale: number = 1

A/B knob on the underwater view extinction, relative to the baked viewExtinctionScale: 1 is the shipped clarity, 0.35 / 0.22 the earlier, murkier water.


waterPlaneY​

• waterPlaneY: number = 0

Methods​

update​

▸ update(input): void

Parameters​

NameType
inputWaterOpticsFrameInput

Returns​

void