Stylized Water Shader Documentation

Stylized Water Shader

Stylized Water Shader
Version: 2.1.6

9.Vertex colors #

Vertex colors are vertex attributes (Vector4) just like position, normals and UV’s are. These can used to drive some of the shader’s behaviour.

You can do this in any 3D modeling tool. Please refer to their manuals on how to achieve this.

You can sample the mesh’s vertex colors to denote where the intersection effect should show, or where the water should be transparent.

If you’d like to show the intersection effect based on vertex colors, under the “Intersection” tab the solver must be set to “Vertex color”.

The “Enable Vertex Colors” checkbox under the Advanced tab must be checked in order to use this. This also enables transparency through vertex colors.

By painting the following colors, the weight is painted for:

Red Intersection
Green Opacity
Blue Wave flattening
Alpha Unused

Automatic baking

An example script can be found here, that bakes values into the mesh’s vertex colors, based on downward raycasts on the terrain.


Yes No Suggest edit
Last updated on May 2, 2023
1 of 1 users found this section helpful
Suggest Edit