diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-05-06 20:29:14 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-05-06 20:29:14 -0400 |
commit | eb8af873097ce73a22139db4924ebd41d766f011 (patch) | |
tree | 2ba63f06e8b787b8091cf1ac8a71974191ac57bb /resources/shaders/foam.vert | |
parent | d8bf256cf18327f48061ed875c98109200288733 (diff) |
foam done
Diffstat (limited to 'resources/shaders/foam.vert')
-rw-r--r-- | resources/shaders/foam.vert | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/resources/shaders/foam.vert b/resources/shaders/foam.vert index a33e343..f27c589 100644 --- a/resources/shaders/foam.vert +++ b/resources/shaders/foam.vert @@ -1,7 +1,9 @@ #version 330 core layout(location = 0) in vec3 position; // Position of the vertex -layout(location = 1) in float wavelength; // wavelenth adjusted for ocean depth +layout(location = 1) in vec3 wavelength; // wavelenth adjusted for ocean depth +layout(location = 2) in vec3 wavedirs; // wavelenth adjusted for ocean depth + //layout(location = 2) in vec2 direction; // wave slope //layout(location = 3) in vec2 texCoords; // texture coords //layout(location = 3) in vec3 norm; // texture coords @@ -43,8 +45,8 @@ vec2 calculateTexCoord(vec3 pos){ } void main() { - dir = vec2(0,0); - constants = vec2(wavelength, phaseC); + dir = vec2(wavedirs[0],wavedirs[1]); + constants = vec2(wavelength[0], phaseC); gl_Position = proj * view * model * vec4(position, 1); pos = vec3(gl_Position); |