FurMark
Current Version: 1.7.0
»FurMark
»Benchmark Submissions

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

My Account



Blogs
»Demoniak3D Blog
»JeGX's Infamous Lab

Link to Us

oZone3D.Net 100% Realtime 3D

»All Site's Network

Visitors Map

 
Bump Mapping using GLSL

By Jérôme 'JeGX' GUINOT
jegx [at] ozone3d [dot] net

Initial draft: November 4, 2005
Update: November 18, 2005
Update: March 8, 2006
Update: December 30, 2006




[ Index ]

Introduction | Page 2 | Page 3 | Page 4

»Next Page







1 - Introduction

2 - Lighting equations

3 - The tangent space

4 - The bump mapping shader

5 - Downloads




1 - Introduction

The bump mapping is one of the per pixel lighting techniques, which means that all the lighting calculations (application of the light equations) are calculated for each pixel. The power of the current graphics processors (or gpu) makes it possible to reach this precision while preserving acceptable frame rates.

Indeed, the demonstration which accompanies this tutorial shows a sphere with a simple texturing rendering that features a per vertex lighting (torus_simple_mapping_test.xml) and the same sphere rendered with the bump mapping technique (torus_bump_mapping_test.xml). In the first case, the FPS is around 900 (usual rate on a development workstation, with a GF7800GT graphic controller) and in the second case, the FPS falls around 500 but with a much better rendering quality as shown on the following images:


fig.1 - Simple texturing rendering with per vertex lighting.



fig.2 - Bump mapping rendering with per pixel lighting.

But these differences between the performances are due to two major reasons: first, the bump mapping is basically a multitexturing technique. In our case, two textures are used for the bump effect. Accessing several textures is more penalizing than dealing with one texture. The second reason is that all the lighting calculations are made for each pixel.

Now, let us analyze the bump mapping technique. The main goal of the bump mapping is to simulate some relief on a flat geometry. That makes it possible to render at a lower CPU cost, objects that have a very detailed appearance. The bump mapping technique is very simple since it consists in using a normal vector that is deformed at the level of the pixel being processed. But before going further in the details of the code, it is first necessary to recall the light equations which we will implement.





[ Index ]

Introduction | Page 2 | Page 3 | Page 4

»Next Page







Language:

3D Graphics Search Engine:

The Geeks Of 3D



Geeks3D News


HackLAB News

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


PhysX FluidMark
Current Version: 1.1.1
»PhysX FluidMark
»Benchmark Submissions



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