Stylized Water 2 documentation

Stylized Water 2

Stylized Water 2
Author: jonathan
Version: 1.1.4
Dated: 22 Sep 2020

3.Getting Started #

Initial project set up

Before using the shader, ensure your project is in fact using the Universal Render Pipeline. Go to Edit->Project Settings->Graphics to check if a pipeline asset has been assigned (name may differ)

If this is not the case, materials will be pink, please refer to the URP documentation for setup instructions.

Note: the choice of render pipeline should be a well-informed decision early in a project. Switching to URP mid-production means other custom shaders may fail to work. Realistically, you should already be using URP before buying/using this asset.

All the materials and demo content are based on the linear color space. For new projects, Gamma-space is used by default. It is recommend to use Linear-space instead for a number of reasons. See the related Unity docs page for more details.

Universal Render Pipeline setup

Double-click the pipeline asset and verify these options are enabled

The depth texture is used for a variety of effects. Should it be disabled, the depth and intersection effects fail to work. Building on Android with this disabled results in the water turning invisible. The opaque texture is used for the refraction effect, and is required when it is enabled.

Should these options not be enabled, yet the shader is using features that require either one of them, a warning and quick-fix button will be displayed in the material UI:

Note that each individual camera can override these settings. If the effects aren’t visible in a specific scene, or for a specific camera. Verify that the options aren’t set to “Off”

If you’re using different pipeline settings, per quality level. Ensure these options are also enabled on them. Otherwise you may notice some water effects not working when building the project, and running the game on a lower quality scale.

Tip: you can double-click the assigned asset to open it in the inspector

Adding water to your scene

  • Drag one of the prefabs found under Assets/StylizedWater2/Prefabs/ into your scene.
  • Adjust the material properties to your liking.

It is advised to create your own materials (or duplicate the ones in the package), so your settings are not accidentally overridden when updating the asset.

Alternatively:

  • Create and assign a new material to your water mesh and assign the shader found under Universal Render Pipeline/FX/StylizedWater2.
  • Add a Water Object component to your mesh through Add Component->Stylized Water 2->Water Object. This is only necessary if you wish to use Planar Reflections, though this has no negative impact otherwise!

Every material parameter has a tooltip that explains its function (if not obvious). Hover over it with the mouse to view a description.

Yes No Suggest edit
Last updated on August 24, 2021
3 of 3 users found this section helpful
Suggest Edit