Skip to content

unitycoder/FFT-Flipbook-Water-Shader-Unity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFT-Flipbook-Ocean-URP

An example of using the flipbook approach to achieve FFT wave motion in Unity. Credits to @GhislainGir's tutorial --> FFT Ocean Flipbook: How to create & sample one using Blender & UE.

WebGL Demo


OceanDemo.mp4

Basic setups of the shader.

  1. Use Blender's ocean modifier to create a multi-wave ocean.
  2. Change the shading of the ocean mesh inside Blender to normal color and height color.

  1. Use "Rendering animation" to output the captured ocean surface result from Blender's camera. This gives you a sequence of images which can be later combined as a single sprite sheet.

  1. Inside Unity, use the flipbook node to sample the normal and height sprite sheet. Adjust the normal and displacement accordingly.

Distanced-LOD

The URP Shader Graph does not support tessellation. In this demo, I use instancing and manually choose LOD based on the distance from the camera. Please note that each LOD mesh's edge needs to have the same vertex count as the aligned mesh. Otherwise, a visible seam will occur.

OceanLod.mp4

About

Example of using flipbook motion to make water shader in unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ShaderLab 79.2%
  • HLSL 14.6%
  • C# 6.2%