Created
February 3, 2018 16:44
-
-
Save OmarShehata/66e08fb07fa33338e9c154fe6d3806a6 to your computer and use it in GitHub Desktop.
Answer to the water waves challenge
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
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