Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Answer to the water waves challenge
attribute vec3 aPosition;
uniform mat4 matrix_model;
uniform mat4 matrix_viewProjection;
uniform float uTime;
void main(void)
vec3 pos = aPosition;
pos.y += cos(pos.z * 5.0 + uTime) * 0.1 * sin(pos.x * 5.0 + uTime);
gl_Position = matrix_viewProjection * matrix_model * vec4(pos, 1.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.