What it does
A Vertex Shader runs GPU calculations for each vertex of a model. It transforms positions for rendering and can deform geometry, for example to make a flag wave.
How to use it
A vertex shader receives mesh attributes and outputs rendering coordinates and varyings. Shader Graph Vertex Position belongs to this stage; values reaching fragments are interpolated.
A concrete example
A waving flag with very few vertices has a coarse silhouette. Higher texture resolution does not add vertices, and GPU deformation does not update the CPU collider automatically.
How to check it
- Increase displacement from a zero baseline while checking silhouette, normals, shadows and bounds.
Inspect positions and directions as separate data - Document object/world space and avoid duplicate coordinate transformation.
Inspect positions and directions as separate data
Limitations
Deformation does not automatically correct normals, bounds, or shadows.