Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79
oZone3D.Net Tutorials - Vertex Displacement Mapping - Vertex Texture Fetching - Shader Model 3.0 - OpenGL / GLSL




GeeXLab
Current version: 0.45.1
>GeeXLab homepage

FurMark
Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage


Blogs
>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.4
>FluidMark homepage

TessMark
Current version: 0.3.0
>TessMark homepage

ShaderToyMark
Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Download
>Libraries and Plugins
>Demos
>Online Help - Reference Guide
>Codes Samples
 
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:
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





GeeXLab demos


GLSL - Mesh exploder


PhysX 3 cloth demo


Normal visualizer with GS


Compute Shaders test on Radeon


Raymarching in GLSL



Misc
>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0033130645751953 seconds.