Skip to content

AbdullahDotM/Toon-Water-Effect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌊 Toon Water Shader (Unity URP)

A stylized toon-style water shader for Unity’s Universal Render Pipeline (URP), designed to bring vibrant, animated water surfaces to your scenes.
It combines depth-based color gradients, dynamic wave motion, foam simulation, and surface distortion for a rich toon-water aesthetic.


✨ Features

  • 🎨 Depth-based coloring — smooth blend between shallow and deep tones
  • 🌊 Animated wave displacement using sine motion
  • ☁️ Dynamic foam generation from surface depth and normals
  • 🌀 Scrolling noise and distortion for surface detail
  • 🧩 Fully adjustable properties for frequency, speed, foam, and distortion
  • 🔍 Alpha blended transparent rendering

📸 Preview

Toon Water Shader Preview


🧱 Setup Instructions

🪞 Requirements

  • Unity 2021.3+ (URP enabled)
  • Depth texture support must be enabled
    (URP Renderer → General → Depth Texture: ✅)

⚙️ Installation

  1. Copy the shader file into your project (e.g. Assets/Shaders/ToonWater.shader)
  2. Create a new Material and assign the shader:
    Shader → Test → Toon Water
  3. Apply the material to a plane or water mesh

🎛️ Shader Properties

Property Description
_DepthGradientShallow / Deep Colors for shallow and deep water
_DepthMaxDistance Distance at which deep color fully appears
_FoamColor Color of surface foam
_FoamMaxDistance / MinDistance Controls foam visibility near edges
_SurfaceNoise / Distortion Textures for surface detail
_SurfaceNoiseCutoff Foam threshold
_SurfaceNoiseScroll UV scroll speed for surface noise
_WavesMaxHight Maximum height of wave displacement
_WaveFrequency Frequency of the waves
_WaveSpeed Speed of wave motion
_WaveDirection X/Z direction of wave flow

🧠 Tips

  • Use soft gradient colors for natural transitions.
  • Adjust _WaveSpeed and _WavesMaxHight for calmer or rougher water.
  • Try different noise textures for unique foam shapes.
  • Works best with planar meshes and moderate tesselation.

About

A stylized toon-style water shader designed for Unity URP. It combines shallow/deep color gradients, foam, surface noise, and dynamic wave motion to create an animated water effect.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors