Notice
This asset is soon to be deprecated! You will still have the ability to download it forever.
A last update will follow where this documentation will be included as a PDF. After 8 years in the running, it is no longer reasonable to put it up for sale.
Thank you for making this asset a long-lasting favorite ❤️
Stylized Water Shader
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.