05 Data becomes vertices
Vertices: really changing the geometry
This time we move the mesh’s actual vertices.
00.55
110
Exercise
Runs once per vertexDrag numbers, or edit the code
JS side
gl.uniform1f(uTime, 0.00)
gl.uniformMatrix4fv(uModel, …) // rotation -0.35 / -0.80The vertex shader really moves the mesh’s vertices; a fragment shader can only change colour, never shape.
Try it
- Set the height to 0: the surface goes flat again
- In the vertex code, change sin to abs(sin(...))