Adding surface detail with displacement mapping
In this recipe, we will use displacement mapping via the tessellation pipeline to add additional geometric detail to an otherwise smooth or flat surface. This is the key technique used for approximating the detail on high-poly meshes using a low-poly version of the same mesh.
Displacement mapping uses a displacement map texture (also known as a height map) that consists of a single channel that is used to control the amount to displace a vertex. Depending on the method of construction, this height map can have a midpoint that allows the vertex to be lowered/raised, or the map may only support displacement in one direction. A displacement map will generally use the same UV coordinates as the diffuse ...
Get Direct3D Rendering Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.