Ocean Shader Normal Reconstruction

Node-based Shader Editor

Ocean Shader Normal Reconstruction

Postby ToxicBOI » Sun Jun 03, 2018 8:17 am

Hi ! :D
I'm trying to implement the ocean shader from the GPU gems on a tesselated plane(https://developer.nvidia.com/gpugems/GP ... _ch01.html), here's my graph :
Image

The Sin Shader Function simply outputs the displacement based on the parameters and the world position, I use one for the displacement in the X direction and one for the Y direction (vertical in unity), here it is :
Image
Image

My question is : How should I go about reconstructing the normals of this shader ? I don't understand how the example works and the equation in the GPU Gems paper seems to produce strange artefacts, probably because the paper and unity uses different x y z coordinate system.

I hope someone here can help me, I've been struggling with this for a long time ^^
ToxicBOI
 
Posts: 3
Joined: Sun Jun 03, 2018 8:02 am

Re: Ocean Shader Normal Reconstruction

Postby ToxicBOI » Sun Jun 03, 2018 5:06 pm

Nevermind, I just found the solution!
In case anyone has the same problem, just pipe the displacement into this :
Image
ToxicBOI
 
Posts: 3
Joined: Sun Jun 03, 2018 8:02 am

Re: Ocean Shader Normal Reconstruction

Postby Amplify_Borba » Mon Jun 04, 2018 10:56 am

Hello, thank you for reporting that you've found a solution and for sharing it with the community, and apologies for not being able to get back to you in time to provide assistance!

Please don't hesitate to let us know if you have any further questions or come across any issues.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 40 guests