A SIMPLE THECNICAL ARTIST
RIVER SHADER


The foundation of this water shader is nothing fancy, it is just using a flow map to push two UVs and using them to sample texture and flip between them.
Artists can use the intensity slider to control how strong the texture is pushed by the flow map. Artists can also use the speed slider to control the speed of the flow.
I changed the range to 0-1 and gave them different color in the video to show the control. They should be in -1 to 1 space and the color should be red and green based on the flow map. This part is the foundation for this shader, once this is built, the rest of it is just to get the art to work right.
Once the foundation is built, one of the requests from the artist is that they want foam and variation. We added another two sets of masks but driven by the flow map. The BC4 white map is controlling where foam could appear, the BC7 foam texture is a packed texture with foam pattern and few variation masks to help artists break up the tile pattern. You can see the foam control in this video.
Since we flip between two movements, sometimes you can see the transition in the normal. to avoid this issue, I added a linerstep() to the flipMask to make the transition smooth. I also added a set of panning normal to make sure there is consistent base movement when the flip happens. It should not be needed but we are using this shader for E3 trailer beginning and end shots. Therefore we added an extra layer.
In order to add more variation, we lerp between two water colors based on the blue channel of the foam mask. Artists can not only give it two different color values, they can also give them different roughness and normal intensity. These settings are helpful to make the water feel less tilling. You can also see why they did not allow me to pick the water color.
CONCLUSION
This shader is not built based on fancy code, but it played an important role for an E3 trailer. I don't need to build the craziest river shader in the world to make it successful. I often need to build the shader the artist needs, and the render engineer needs. When the team works together and has a clear focus, we can make good looking things with simple codes.