Stylized Water 3 – Documentation

Stylized Water 3

Stylized Water 3
Version: 3.0.1
Review

4.5.Decals #

Decal Projectors cannot affect the water surface, because it is transparent in nature and therefor doesn’t write into the render pipeline’s depth texture.

Instead, this asset features it own – water specific – decal method.

Water decals are regular plane meshes, using a specialized shader. This shader reads out the water’s height at every vertex position, and then snaps its Y-position to that height. As a result the plane appears to float on the water surface. Effects such as waves and dynamic effects influence them as well.

You can find several drag-and-drop decals in the Prefabs/Decals folder

Project setup

This functionality requires the “Height Pre-Pass” option to be enabled on the Render Feature.

Water objects need to be on the “Water”. Otherwise their surface height information isn’t captured.


Any included prefabs will be on the this layer by default

Notes

Take note of the “Sorting Priority” on every water decal’s material being set to (at least) +1. This ensures that they render on top of the water. If the water material has the “Depth Writing” option enabled, they may still appear to clip through it.

The premade decals are transparent materials. This means transparency sorting comes into play, some decals may render over others in different camera angles. This is a normal aspect of 3D rendering in Unity.

Yes No Suggest edit
Last updated on October 23, 2024
1 of 1 users found this section helpful
Suggest Edit