Documentation / scene / WaterRefractionMode
Type Alias: WaterRefractionMode
WaterRefractionMode =
"march"|"offset"
Defined in: libs/scene/src/material/water.ts:51
How the refracted view sample is located.
march: walk the refracted ray against the scene depth buffer and sample at the first crossing, at the cost of REFRACT_MARCH_STEPS depth fetches per water pixel.offset: displace the screen UV by the refraction of the wave normal alone, with no search. Much cheaper, but the sample does not land where the ray actually goes and the medium tint uses the straight-line distance.
The two agree on calm water viewed from above and diverge with wave steepness and view angle.