Shader Builder | Universal Fluid Surface Shader

A customizable fluid surface shader framework built with Unity and the Universal Render Pipeline (URP), capable of dynamically switching between realistic water rendering and toon shading.

What I did — build an adjustable fluid surface shader

I built a Unity URP shader with adjustable wave motion, depth fade, refraction, foam, and surface highlights. Layered normals and procedural vertex displacement drive the water, while raindrop and heat-distortion effects extend the range of environments it can represent.

What I think — expose the controls an artist needs

A reusable shader needs a useful range of visual choices, not just one attractive preset. Separating wave strength, motion, color, foam, and transparency lets the same surface move between stylized and more natural treatments. I treat that flexibility as an art-direction tool, rather than claiming one setting works for every scene.

Design process

Developing a Versatile Universal Water Shader

The Universal Surface Water Shader was designed to create flexible, dynamic water surfaces in Unity, supporting both realistic rendering and stylized aesthetics. Unlike many existing shaders that focus on fixed art styles, my approach prioritized customization and adaptability, allowing developers to tweak wave patterns, foam behavior, transparency, and refraction effects to suit various game environments.

Depth, Reflection, and Transparency

To create a visually rich water surface, I implemented gradient-based depth fading, allowing smooth transitions between shallow and deep areas. The shader also featured adjustable reflections, offering crisp mirror-like effects or diffuse water reflections based on scene requirements. Transparency was fine-tuned with depth-based alpha adjustments, ensuring a natural water appearance across different lighting conditions.

Wave Motion and Surface Detail

For dynamic water movement, I combined normal textures and vertex displacement to generate realistic wave motion. By layering opposite-moving normal maps and applying procedural vertex offset using gradient noise, I ensured fluid motion with adjustable wave strength and speed. This setup allowed the shader to adapt seamlessly to oceans, lakes, and stylized environments.

__wf_reserved_inherit
Layered Water Effects: Combining Vertex Height, Normal Texture, and Ripple Highlights for a Dynamic Surface

Refraction, Foam, and Environmental Effects

To enhance realism, I introduced depth-based refraction, causing objects beneath the surface to distort dynamically. I also implemented procedural foam generation, ensuring natural shoreline and object interactions. Additionally, I integrated raindrop ripples and heat distortion effects, making the shader adaptable to diverse weather conditions.

__wf_reserved_inherit
Foam Effect: Cel-Shaded Style for Enhanced Compatibility with Anime-Inspired Art

Conclusion: A Flexible and Optimized Solution

This shader provides a modular and highly customizable approach to water rendering, balancing performance efficiency with visual fidelity. By supporting both realistic and stylized aesthetics, it serves as a versatile solution for developers looking to create dynamic, immersive water surfaces in their projects.

Other projects: