TA Toolbox Home / TA Glossary

Tessellation

2026-08-27

What is Tessellation

Tessellation is a programmable rendering pipeline stage introduced in DirectX 11 and OpenGL 4.0. It allows the GPU to dynamically subdivide coarse meshes into smaller triangles based on certain rules (e.g., distance, curvature), thereby increasing geometric detail in real time without increasing initial model data. This technique enables smooth surfaces, complex displacement, and adaptive level of detail (LOD).

Position in the Rendering Pipeline

Tessellation sits after the vertex shader and before the geometry shader. It comprises three optional stages:

  • **Hull Shader**: Defines tessellation factors, determining how much each primitive is subdivided.
  • **Tessellator**: A fixed-function unit that actually generates new vertices and topology based on tessellation factors.
  • **Domain Shader**: Computes position, normal, and other attributes for new vertices, often combined with displacement mapping.

In OpenGL, the corresponding stages are Tessellation Control Shader (TCS), Tessellation Engine, and Tessellation Evaluation Shader (TES).

Main Application Scenarios

Smooth Surfaces

By subdividing coarse meshes and applying smoothing algorithms (such as PN triangles), generate surfaces similar to high-polygon models. Commonly used for character skin, car bodies, etc.

Displacement Mapping

Combined with height or displacement maps, offset vertices along the normal in the domain shader to create real geometric bumps, such as terrain folds and relief details.

Adaptive LOD

Dynamically adjust tessellation factors based on camera distance: closer objects get more subdivision, farther objects get less, achieving continuous and efficient detail transitions without traditional LOD popping.

Terrain Rendering

Using frustum culling and distance checks, only tessellate visible and near terrain chunks, saving performance.

Advantages and Limitations

**Advantages**:

  • Initial models can be low-poly; details are added in real time via subdivision, saving memory and bandwidth.
  • Supports dynamic LOD, allowing geometry complexity to change smoothly with distance.
  • Combined with displacement mapping, generates highly realistic surface details.

**Limitations**:

  • Requires GPU and graphics API support for tessellation (DX11+ / OpenGL 4+); some mobile platforms do not support it.
  • Improper tessellation factors may cause performance drops or cracks (T-junctions).
  • Additional computational overhead for post-vertex-shader data; heavy tessellation can become a bottleneck.

Differences from Related Techniques

  • **Normal Mapping**: Only changes lighting normals, not geometry.
  • **Parallax Mapping**: Offsets texture coordinates in the fragment shader to simulate depth, but does not alter geometry topology.
  • **Displacement Mapping**: Typically requires tessellation to provide enough vertex density; otherwise displacement cannot show detail.

Tessellation is a true geometric operation; generated vertices participate in subsequent pipeline stages, producing correct silhouettes and shadows.

Implementation Example (Pseudocode)

```

// Hull Shader: Set tessellation factors

HS_CONSTANT_DATA_OUTPUT ConstantsHS(InputPatch<VS_OUTPUT, 3> p, uint PatchID : SV_PrimitiveID)

{

float tessFactor = ComputeTessFactorFromDistance(p);

HS_CONSTANT_DATA_OUTPUT output;

output.Edges[0] = output.Edges[1] = output.Edges[2] = tessFactor;

output.Inside = tessFactor;

return output;

}

// Domain Shader: Compute new vertex position

[domain("tri")]

DS_OUTPUT DomainShader(HS_CONSTANT_DATA_OUTPUT input, float3 uvw : SV_DomainLocation, const OutputPatch<VS_OUTPUT, 3> patch)

{

DS_OUTPUT output;

float3 p = uvw.x * patch[0].pos + uvw.y * patch[1].pos + uvw.z * patch[2].pos;

// Apply displacement map if available

p += Displacement(p, uvw);

output.pos = mul(float4(p, 1.0f), ViewProjMatrix);

return output;

}

```

FAQ

What is the relationship between tessellation and displacement mapping?

Displacement mapping requires sufficient vertex density to show details. Tessellation can dynamically increase vertex count, so they are often used together. Tessellation provides the geometric base, and displacement mapping offsets vertices in the domain shader.

In which graphics APIs is tessellation available?

DirectX 11 and above, OpenGL 4.0 and above, Vulkan, and Metal (partial support) support tessellation. Note that some mobile GPUs may not support it or have poor performance.

Does tessellation affect performance?

Yes, tessellation increases vertex count and computation, but adaptive tessellation factors (e.g., based on distance) can balance performance and quality. Proper use yields good benefits.

What is the difference between tessellation and normal mapping?

Normal mapping only changes normals in lighting calculations, not geometry. Tessellation actually generates new vertices, altering surface topology, resulting in more realistic silhouettes and shadows.

How to use tessellation in Unity?

Unity's HDRP and URP support tessellation shaders. You need to write hull and domain shaders in Shader code, or use built-in tessellation options. Refer to Unity documentation for details.