GPU Gems Wave simulation

Node-based Shader Editor

GPU Gems Wave simulation

Postby T_Freeze » Sat Sep 01, 2018 11:09 am

Hello,

I've been trying to follow this GPU Gems article on gerstner water simulation:
https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html

So far everything seems fine and I managed to get the Gerstner waves to work nicely according to their function.
Image
Image

Later on the article goes on about adding extra detail by calculating the surface orientation at any point on the plane.
They say this is possible as the information needed to calculate this can be obtained from the same function that is used to calculate the vertex positions. The surface orientation can be calculated by the crossproduct of the binormal and the tangent.
They give the following functions for calculating the normal and tangent:
Image

Which i have converted to Amplify as:
Image
Image

I then take the crosspoduct of these two variables and plug this into the normal port of my shader. This gives me rather weird results:
Image

Has anyone else tried to recreate this article in Amplify? Or see what I'm doing wrong. Any help is much appreciated!
T_Freeze
 
Posts: 1
Joined: Sat Sep 01, 2018 10:46 am

Re: GPU Gems Wave simulation

Postby Ricardo Teixeira » Sat Sep 01, 2018 3:02 pm

Hello,

Thank you for getting in touch but this forum is aimed at editor support and general shader inquiries, I don't think you'll get many replies here from other users.

Unfortunately, this goes beyond of the scope of our editor; I recommend posting your question directly in the dedicated Shader section of the Unity Forum.

Thanks!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: Bing [Bot] and 26 guests