Relief texture mapping in WebGL

10th January 2014

Primarily used for texturing, relief mapping is the process of using depth information to trace the geometry defined by the depth on a polygonal object. The ray tracing is performed on the fragment shader, where the ray is checked at increments if it collides with the surface defined by the depth map.

The technique is best described by Manuel M. Oliveira on his website, later enhanced using Cone Step Mapping, Relaxed Cone Step Mapping, Anisotropic Cone Step Mapping and Quadtree Displacement Mapping.

Live Demo

You can find a simple demo of relief mapping below. Note that there are no acceleration structures used to speed up the convergence of the ray casting on the depth texture.

Launch Full-screen

Make a comment

Contribute to this article and have your say.