Current version: 0.16.x
»GeeXLab homepage

Current version: 1.19.0
»FurMark homepage
»FurMark 1.9.x Submissions

GPU Caps Viewer
Current version:
»GPU Caps Viewer homepage
»GPU DB Submissions

GPU Shark
Current version:
»GPU Shark homepage

»JeGX's HackLab

Geeks3D's Articles
»GPU Memory Speed Demystified

»Multi-Threading Programming Resources

»GeForce and Radeon OpenCL Overview

»How to Get your Multi-core CPU Busy at 100%

»How To Make a VGA Dummy Plug

»Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.2
»FluidMark homepage
»FluidMark 1.4.x Submissions

Current version: 0.3.0
»TessMark homepage

Current version: 0.3.0
»ShaderToyMark homepage
»ShaderToyMark Scores

Current Version: 1.23.0
»Libraries and Plugins
»Online Help - Reference Guide
»Codes Samples

3D Graphics Search Engine:

The Geeks Of 3D

Vertex Displacement Mapping using GLSL

By Jerome Guinot aka 'JeGX' - jegx [at] ozone3d (dot) net

Initial draft: March 26, 2006
Update 3: September 30, 2008
Update 2: November 22, 2006
Update 1: November 5, 2006

[ Index ]

Introduction | Page 2 | Page 3 | Page 4 | Conclusion

»Next Page

Stumble it! | | | |

1 - Introduction

2 - Displacement Principle

3 - Displacement Vertex Shader

4 - The problem of Normals

5 - Conclusion

6 - Further Resources

7 - Downloads

1 - Introduction

Vertex Displacement Mapping or simply Displacement Mapping is a technique allowing to deform a polygonal mesh using a texture (displacement map) in order to add surface detail. The principle is not new, it is even the basis of number of terrain generation algorithms (see the Terrain Generator GLUT project). The new thing is the use of the GPU to achieve in real time the mesh deformation.

Update: November 5, 2006:

The displacement mapping involves a graphics controller that allows to access at least to one texture unit inside the vertex shader. The access to a texture inside the vertex shader is called Vertex Texture Fetching. The shader model 3.0 imposes that at least 4 texture units are accessible inside the vertex shader. Currently, only the graphics controllers based on nVidia Geforce 6, Geforce 7 and higher support the Vertex Texture Fetching. ATI graphics controllers do not support the Vertex Texture Fetching even for the latest high-end models such as the X1950XTX (for more explanation see here: ATI X1900XTX and VTF).

Update: November 22, 2006:

It seems that there are some problems with the Forceware graphics drivers 91.xx and 93.xx. The older drivers (84.xx) or the latest (96.xx) work properly (see the following topic for more detail: Vertex Displ. Mapping on Demoniak3D Forum).

Update: September 30, 2008:

Vertex texture fetching is now available on radeon: ATI Catalyst 8.10 Fixes the Displacement Mapping Bug in OpenGL @ Geeks3D.

The GPU Caps Viewer tool will allow you to quickly know the number of accessible texture units inside a vertex shader :

Fig. 1 - Number of Texture Units Inside a Vertex Shader

This information can be get in OpenGL using the constant:

Figure 2 shows the rendering of the project that comes with this tutorial (available at the end of this page). We will use the Demoniak3D platform in order to quickly code the displacement mapping demo.

Fig. 2 - DEMO_displacement_mapping.xml

The different demos use the GLSL (OpenGL Shading Language) for shaders coding.

[ Index ]

Introduction | Page 2 | Page 3 | Page 4 | Conclusion

»Next Page

GeeXLab demos

GLSL - Mesh exploder

PhysX 3 cloth demo

Normal visualizer with GS

Compute Shaders test on Radeon

Raymarching in GLSL

Geeks3D latest news

Geeks3D forum news

»Texture DataPack #1
»Asus Silent Knight CPU Cooler
Page generated in 0.010982990264893 seconds.