My Account


RSS
oZone3D.Net RSS Feeds»RSS 2.0 Feeds

Blogs
»The Geeks Of 3D
»Demoniak3D Blog
»JeGX's Infamous Lab

Sponsors

Modul8: real time video mixing and compositing


Link to Us

oZone3D.Net 100% Realtime 3D

»All Links

Search
Google
Web
oZone3D.Net

Web Partners

www.benchmarkhq.ru
www.tdt3d.com
www.steph3d.net
www.g-truc.net
www.worldpcspecs.com


Banners Exchange

cgindia.blogspot.com
grapejuice.c.la
www.game-lab.com
www.cooki3d.org


Links Exchange

»CYGAD's 3DXtra
 
Vertex Displacement Mapping using GLSL

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

Initial draft: March 26, 2006
Update: November 5, 2006
Update: November 22, 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).

The tiny tool HardwareInfos 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:
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB.

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.

OpenGL.org





[ Index ]

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

»Next Page







Language:


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


GPU Caps Viewer
Current Version: 1.4.2
»GPU Caps Viewer
»GPU DB Submissions


FurMark
Current Version: 1.3.0
»FurMark
»Benchmark Submissions
Page generated in 0.071547985076904 seconds.