Stylized Water 3 – Documentation

Stylized Water 3

Stylized Water 3
Version: 3.0.1
Review

4.9.Third party integrations #

When importing the water shader into your project, a check is performed to detect any compatible fog assets in your project. If one is found, an integration is automatically compiled into the shader code.

Installing a fog asset, after importing the water shader?
Select the StylizedWater3_Standard shader file and click the “Recompile” button!

Some fog assets contain shader code that causes the water shader to throw compile warnings. These must be corrected on the author’s end, but are otherwise harmless.

Fog assets

Depth-based fog effects cannot shade transparent materials, such as water. Instead, the exact same fog shading must be applied directly in the shader, similar to how the built-in Unity fog works.

Most fog assets provide general use shader functions, which the water is able to incorporate. This allows it to mirror the fog shading perfectly.

Should a fog effect renderer be disabled, it will still apply to the water, since it is handling fog on its own (based on the last provided settings passed to shaderland).

It’s possible to toggle fog shading for the water globally through script. This example script disables fog for a specific camera. You can repurpose the same functionality, where the global _WaterFogDisabled float is set to either 1 (on) or 0 (off).

COZY Weather

COZY renders its skybox and fog as scene geometry using transparent materials. Because of this, the water material’s Render Queue value will automatically be set to 3002 (default is 3000).

This will ensure the water always renders in front of the sky & clouds, but behind the fog sphere. This behaviour is inherent to how 3D transparency rendering works in Unity and is not specific to either assets.

Discrepancies between COZY’s fog and how it appears on the water are attributed to the shading function that COZY supplies and cannot be corrected in the water shader. Please use this debug shader to verify the integration.

Enviro 3

Requires version 3.2.0

Planar Reflections will not reflect Enviro’s fog. This is due to – what can be considered – a design flaw. It must be corrected in Enviro’s rendering code.

The water may appear white with this integration active, when enabling Enviro and then disabling it (or moving to a scene without Enviro). The developer must expose a boolean to shaders to indicate that it is active, unfortunately that’s still not the case.

Azure Sky

Atmospheric Height Fog

Version 3.2.0 or newer is required

Other assets

Curved World 2020

This asset is currently not Unity 6 compatible!

This has to be activated through the “Activator” tab in the Curved World window. It should point to the Assets/Stylized Water 3/Shaders folder before hitting the “Activate” button.

After which, options will appear in the material UI at the very bottom.

Yes No Suggest edit
Last updated on November 19, 2024
0 of 0 users found this section helpful
Suggest Edit