GLSL Hacker
Current version: 0.8.2
»GLSL Hacker homepage
»GLSL Hacker Overview

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

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

GPU Shark
Current version: 0.9.4
»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.4.0
»GeeXLab homepage
»GeeXLab Overview

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: November 5, 2006
Update: November 22, 2006

[ Index ]

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

»Next Page

4 - The Problem of Normals

One of the biggest drawbacks of vertex displacement mapping is that faces normals and then those of vertices are damaged since they are valid for the un-deformed mesh. As we are inside a vertex shader, we can not access to the two other vertices that form the current processed face and then we can not recalculate the normal...

But there are two manners to come out of this tricky problem. The first one is simply to not use... the normals! With static lighting (like the lightmapping), the normal is useless since the lighting comes from the light-map.

The second manner is to provide the normal to the pixel shader. A simple method is to create a normal-map from the displacement map. The normal-map holds normal vectors that are orientated to simulate the displacement map relief. This technique works quite well if we forget some little imperfections like some areas that should not be lit...

The following picture shows the result of a BumpDisplacementMapping shader. Both displacement and normal maps have been created from the base map (texture of stone). This project is available in the downloadable archive.

Fig. 5 - DEMO_bump_displacement_mapping.xml

[ Index ]

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

»Next Page

GLSL Hacker 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.0103919506073 seconds.