Last active
October 19, 2019 20:43
-
-
Save Bailey3D/5b67bef5b39221e4594cda84b8e3a36f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float4 vec = float4(0,0,0,0); | |
float pW = 2 / waveLength; | |
float wSpd = (time * phase * pW); | |
float wDot = (dot(wPos.xy, normalize(windVec).xy) * pW) + wSpd; | |
float calcSteepness = amplitude * (steepness / (amplitude * pW * 36)); | |
vec.x = cos(wDot) * windVec.x * calcSteepness; | |
vec.y = cos(wDot) * windVec.y * calcSteepness; | |
vec.z = sin(wDot) * amplitude; | |
vec.w = amplitude * pW * pW * phase; //Amplitude Mask | |
return vec; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment