Stylized Water 2 documentation

Stylized Water 2

Stylized Water 2
Version: 1.5.1

4.7.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 StylizedWater2_Standard shader file and click the “Recompile” button!

Installation state for third party assets can also be verified through the asset window, accessible through the Window → Stylized Water 2 → Hub menu

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).

As of version 1.1.2, 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).

SC Post Effects

On the Fog render feature, the “Skip Transparents” checkbox must be set for this to work correctly.

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.

This asset is unfortunately not compatible with the Underwater Rendering extension! As it requires shader code changes, as outlined here.


Note: Without Enviro’s fog render feature active, the water will turn white, since no fog settings will be passed on.

Azure Sky

Atmospheric Height Fog

This asset is unfortunately not compatible with the Underwater Rendering extension! As it requires shader code changes, as outlined here.

Buto | Volumetric Fog and Lighting

Other assets

Curved World 2020

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

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

Note that the Underwater Rendering extension is not compatible with this asset.

Dynamic Water Physics 2

If present in the project, a Stylized Water Data Provider component is made available. This is DWP2’s mean of using the Buoyancy API, allowing it to read the water’s height height and normal, which in turn is factored into physics calculations.

By going to Help->Stylized Water 2->Hub Window you can quickly set up this component

A minimum of version 2.5.6 is required

Installation state of this asset is based on the “NWH_DWP2” scripting define symbol, which the asset automatically adds to the project.

Buoyancy only works for flat water bodies, such as lakes and oceans. A curved mesh such as a river or planets is not supported. It’s unlikely support for this will appear, due to the technical complexity involved.

For further details, see the Buoyancy section…

Yes No Suggest edit
Last updated on September 11, 2023
3 of 4 users found this section helpful
Suggest Edit