Home Unity

[Unity] Tesselated Ocean Shader Normal Reconstruction

[Deleted User]
polycounter lvl 5
Offline / Send Message
[Deleted User] polycounter lvl 5
Hi ! :)
I'm trying to make an ocean shader based on this GPU Gems article (https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html ) and this YouTube tutorial(https://www.youtube.com/watch?v=_y7Z0MbGOMw), with Unity's Amplify Shader editor. Here's my graph :

And the Gerstner Wave Shader Function is a bit messy :
But it's basically this function :

Here's my question : In the video and in the paper, they uses this function to recalculate the vertex normals :


But I can't figure out how to reproduce the Unreal Graph for this function inside of Amplify Shader Editor, it gives me really strange artifacts.
I assume that it's because both the paper and Unreal uses different x y z coordinates systems, but I can't figure out what to change :c
How should I go about recalculate these normals ? I hope someone here can help me, I've been struggling with this a lot !

PS: I'm french, please excuse my english ^^

Replies

Sign In or Register to comment.