PDA

View Full Version : why use tangent space for bump mapping



airseb
08-07-2005, 04:49 AM
Hi,
why use tangent space for bump mapping ? why is it useful ?

V-man
08-07-2005, 08:06 AM
It results in less instructions for the fs. People usualy transform light and half angle vector to tangent space in the vs. In the fs, you just fetch the normal and compute the dot products.

So it may run faster on whatever GPU you have, also some GPUs can'y handle too many instructions in the fs.

airseb
08-07-2005, 08:23 AM
ok thanks !

Humus
08-07-2005, 03:45 PM
Also, if you don't use tangent space, you'd have to have unique bumpmaps for every surface since they would face in different directions. That would require huge amount of memory.

airseb
08-09-2005, 01:04 PM
thanks too ! ;-)

V-man
08-10-2005, 05:08 PM
There is a difference between what I said and what Humus said. I was talking about bump map that is in tangent space but you do the computation in another space like object or eye space.

If you have eye space bump maps, then the benifit is that you don't need to do matrix transforms for taking the light vector and half angle vector to tangent space. It wastes memory like he said. I would not bother with this method.