Stylized Water 2 - Underwater Rendering (Extension)
This component (singleton, just one instance) needs to be active and enabled in the scene for rendering to take effect. It handles passing on fog and water material settings. As well as setting the base water level height.
If features like Caustics, Waves or Lighting are disabled on the water material, they’ll also be disabled for the post processing effects.
Important aspects can also be controlled, as outlined in the Scripting section.
Controlling setting through volumes
On the Underwater Renderer component there is the “Use Volume Blending” option for the fog.
When enabled, the settings on the component are ignored, and will be controlled through volume profiles instead.
Using volumes works just like any other volume component. For usage instructions, see the Unity manual. If no volume has any underwater settings, the default values are used.
Water vertex density
In order to prevent cracks between the waterline and the water surface. The water mesh requires a decent vertex count (eg. 4 vertices per unit) near the camera.
To inspect a mesh’s wireframe, you have to enable this in the Gizmo menu
Fog and large worlds
It’s important to understand that the underwater fog is based on scene depth. If the terrain abruptly ends, showing a void/skybox, the fog will appear as 100% dense there (since its infinitely far away). This also happens when there is simply nothing under water.
Consider taking this into account and ensure the boundaries of your world does not have any holes. Most open world games have a stretch of land that goes beyond the playable area for such reasons.