
CAVE WATER SHADER
The primary objective of this project was to develop a fully customizable water shader, created entirely within the shader graph, that incorporates various functionalities such as wave and foam effects, buoyancy, and an interactive sand edge.
This project was created during a 2-week period (spring 2026).
Unreal Engine 5 - Water Shader
PROJECT OVERVIEW
Key features in this project are:
-
A fully customizable water shader built in Shader Graphs using world position offset to manipulate movement
-
Procedural shader animations for props
-
Procedural 3D assets and materials
-
Custom light functions
-
Custom post-process material for underwater effect
-
PCG Scattering for foliage
-
Niagara VFX
The objective of this project was to develop a custom water shader from the ground up, incorporating adjustable features such as modifying the world position offset's direction, scale, and intensity. The shader also allows for control over water opacity and subsurface scattering effects. Additionally, a wave and foam material function was implemented to simulate water contact with surfaces. To enhance the overall setup, I also worked on a buoyancy effect for custom meshes submerged in water by utilizing world position offset within their master shader. Furthermore, I added a feature to simulate the wetting of sand caused by water interaction.
To display the water shader in a natural environment, I used procedural tools such as procedural modeling, PCG, and shader animations in my development to build up the scene.


WATER SHADER OVERVIEW
The water shader is built using Gerstner wave logic to create interpolated wave motion.
The overall movement is a combination of bigger world position offset waves together with a normal map that adds small surface ripples.
To improve interaction of the water with nearby surfaces, I implemented an edge function that works together with a foam system, creating a more discrete transition along shorelines and intersections.
EDGE WAVE AND FOAM
To expand on the water shader functionality, I added a wave-based function that spawns a foam texture on the water surface, simulating foam forming when water interacts with objects.
The foam system is built using multiple edge masks to create a more natural movement. The base mask is generated by using a DistanceToNearestSurface node, which is then tweaked to generate different foam patterns.
This foam function is added to the main master water shader, where it is combined with the world position offset and used to layer foam on top of the base water surface.

WATER SHADER BREAKDOWN
BUOYANCY
During this project, I explored how I could create buoyancy using my custom water shader without relying on Unreal Engine plugins. I tried different approaches to fake floating but quickly found that Unreal Engine 5 did not provide some functionality needed to replicate Unreal's own buoyancy simulation without using the built-in water plugin.
To adapt, I developed a workaround that allowed custom meshes to appear buoyant while remaining syncronized with the same wave function used in the water shader. Using a Material Parameter Collection (MPC), I defined global world position offset parameters for the water's movement to be able to feed these values into the master material for the floating objects, allowing me to adjust the water and the objects together.
However, this approach was not ideal, since WPO operates on individual vertices rather than treating the mesh as a single rigid body; it caused subtle deformation and unwanted movement artifacts on the floating objects, especially visible at close range. But despite these limitations, the solution was sufficient given the project's time constraints.
BEACH EDGE
To finalize the water functionality, I implemented a shoreline effect to visualize where the water reaches the beach, causing the sand to appear darker and wet.
To achieve this, a black-and-white world position mask was animated along the Z-axis, offsetting its position between two values over time. The offset is driven by a sine function to simulate the motion of incoming and receding waves.
This mask is then used as the alpha input in a lerp node, blending between two sets of albedo, roughness, and normal map textures representing dry and wet sand. This creates the effect of the sand becoming darker, smoother, and more saturated where the water has passed.

Sand Material - World Position Mask going into an Albedo Lerp
Sand Mask Movement
CREDITS
-
Angel Statue, Sebastian Sosnowski SketchFab here.
-
Pirate Ship (fbx, texture), TIG from SketchFab here. The ship FBX was modified in Houdini and Blender.
-
Mermaid (fbx, texture and animation), Charlie Catling from SketchFab here. (The original material was modified in Unreal).
-
Surface foliage is FAB Quicksel Assets.
SELF-MADE ASSETS
-
Procedural Rocks - Geometry Nodes Blender.
-
Swinging Ropes - Houdini Procedural Generation
-
Procedural Materials in Substance Designer - Rock, Moss, Sand, Water Textures.
-
Sea Weed - Substance designer.
-
Coins - Blender, Substance Painter
FINAL RENDERS




