Stylized Water 2 – Underwater Rendering docs

Stylized Water 2 - Underwater Rendering (Extension)

Stylized Water 2 - Underwater Rendering (Extension)
Version: 1.2.4

5.Usage with fog effects #

Third-party fog effects (such as Enviro or Azure) have no way to tell which part of the environment is above, or underwater. So their effects will also apply to the underwater environment.

Both the COZY and Atmospheric Height Fog assets require editing their shader file(s) to incorporate support for the Underwater Rendering effect (see Transparent Materials).

As long as the underwater fog is denser, this will be hardly noticeable, it’ll simply render on top of it all.

These effects have to execute before underwater rendering does. On your renderer, ensure the fog feature is above the underwater feature

Third party effects should execute on the RenderPassEvent.BeforeRenderingTransparents event.

Alternatively, any custom effect can use the globally exposed _UnderwaterMask render texture to mask their effects to only show above water. See this code snippet for an example.

This does not apply to Unity’s built-in fog, which does not render as a post-processing effect

Yes No Suggest edit
Last updated on August 2, 2023
1 of 1 users found this section helpful
Suggest Edit