Apart - Water shaders
This page presents the River' waterfall and lake effects I made for Apartin my last yeat as a game developer student.
River Shader - Final version
Waterfall Shader - Final version
Lake Shader - Final version
Initial Intention
Concept art by Aude Cazottes
The objective was to create water shaders for waterfalls, rivers and lakes.
The points we wanted to implement in those were : shore foam, transparency, splashes near rocks, refraction, foam for the bottom of waterfalls.
For that, we set several points we wanted to implement :
- Shore foam
- Transparency
- Splashes near rocks
- Slight refraction when the water is moving
- Foam simulation for the bottom of waterfalls
Breakdown
Common features
- Color variation with depth & transparency
Color variation is set based on the depth of the water, by calculation the distance between the surface and the nearest 3D model behind it.
Transparency, made by using the scene color node with a lerp that blends with the colors, with more transparency for shallow waters.
- Shore foam
With the same method used for the color variation, foam is rendered near the shores and objects colliding with the water.
Specific features - River
- Foam
Foam simulation: in the shader with texture distortion, and outside the shader using vfx graph.
- Lines
Sensation of current added by making a texture scroll through the object's UVs.
Specific features - Waterfall
- Foam
Foam simulation: in the shader with texture distortion, and outside the shader using vfx graph.
Specific features - Lake
- Surface caustic-like effect
Multiplying two textures scrolling in opposite direction so that the water doesn't look still