IT lexicon › Programming › Vertex displacement

Vertex displacement

Programming På svenska → Updated: 2026-10-26

Moving a mesh's vertices in the vertex shader at render time — waves, flags, bending grass — without altering the stored geometry.

The vertex shader runs once per vertex on the way to the screen, and there you can offset each vertex before it is projected. The offset comes from a function of time and position or from a texture, applied along the vertex normal or a given axis. Because the base mesh never changes and it all happens on the GPU, procedural motion — ocean swell, flapping flags, wind-blown grass — is nearly free.

Distinguish it from displacement mapping, which adds real geometric detail from a heightmap, often via tessellation. Vertex displacement adds no vertices; it only moves the ones already there. A classic pitfall: shift the vertices without recomputing the normals and lighting goes wrong — the surface looks flat or inverted even as it waves back and forth.

← Back to the lexicon