Skip to content

Documentation / scene / MAX_CAUSTIC_WATERS

Variable: MAX_CAUSTIC_WATERS

const MAX_CAUSTIC_WATERS: 4 = 4

Defined in: libs/scene/src/material/shader/helper.ts:81

Water bodies that can cast caustics into one map.

They share the map and the slice, so this is not a limit on how much water a scene may hold - only on how many separate surfaces the receiver will test itself against, which it does per fragment. Four covers a lake with a couple of pools beside it; beyond that the renderer keeps the largest four, which are the ones a viewer is most likely to be standing over.

Released under the MIT License.