Tuesday, 15 April 2008

Relaxed Cone Step Mapping Shader


After reading about the relaxed cone step mapping from GPU Gems 3 chap 18, I'm having a look at the shader program written by Fabio Policarpo, the author of the chapter in GPU gems.

Having worked on the simple shaders as discussed a few posts earlier, I'm trying to work out how he has used the vertex and pixel shaders to come up with the results for the relaxed cone map. The image here shows the final results of using this kind of cone step mapping.

Currently, reading on tangent space to have a better idea as searching around, it seems that its used a lot for per pixel lighting.

Tangent space: coordinate system in which the texture coordinates for a face are specified. Z-axis is the face normal.

Why use tangent space?
Certain per pixel lighting techniques and many other shaders require normals and other height information declared at each pixel point. This means that we have one normal vector at each texel and the n axis will very for each texel.

Lets see where tangent space takes me, and then I'll be posting more stuff about texture maps soon, converting normal maps to depth maps, and then depth to cone in order to use it on objects using FX composer.

No comments: