Back to index
Procedural Vertex Animation
Exercises
Implement a wave function using
sin()
.
Have the wave depend on the
p.x
variable and
time
.
Reduce the amplitude of the wave to
0.05
.
Set the spatial frequency to
25.0
.
Change the phase constant (temporal frequency) to
5.0
.
Introduce a dependency on the
p.y
variable as well.
A good direction for this wave is
(0.4, 0.2)
.
Inputs
Vertices
// x, y, z, s, t
Uniforms
float time
// elapsed time
mat4 view
// view matrix
mat4 proj
// projection matrix
Indices
Vertex shader
Render window
Compile log
Compile