summaryrefslogtreecommitdiff
path: root/resources/shaders/foam.vert
diff options
context:
space:
mode:
Diffstat (limited to 'resources/shaders/foam.vert')
-rw-r--r--resources/shaders/foam.vert8
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);