Stylized Water 3
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.
Select the StylizedWater3_Standard shader file and click the “Recompile” button!
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.
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.
Requires version 3.2.0
Version 3.2.0 or newer is required
Other assets
Adding the Curved World feature set to the water shader requires a few manual shader code modifications.
Start by opening the Assets/Stylized Water 3/Shaders/StylizedWater3_Standard file in a text editor, or your IDE. And uncomment (remove the leading “//”) these lines:
Followed by uncommenting the lines that read #include "Assets/Amazing Assets/Curved World/Shaders/Core/CurvedWorldTransform.cginc"
in all the files in the Assets\Stylized Water 3\Shaders\Passes folder.
After which, options will appear in the material UI at the very bottom.