View Full Version : different attenuation on 3 axis

04-16-2005, 11:49 PM
Attenuation doesn`t work if brightness is different on one of the 3 axis.

I use

where lightVector is the tangent space vector of the light.
brightness is a 3 float vector.
Now if x isn`t equal to y and z then the attenuation is not correct, what is wrong ?
Or how can I do variable attenuation on 3 axis ?

PS: this works if i don`t put the light vector in tangent space ( and yes, tangent space IS calculated correct )

04-17-2005, 01:09 AM
You either have to convert your attenuation to tangent space, too, or you have to use the world space light vector for attenuation calculation...

04-18-2005, 10:52 AM
If I use the world space light vec for attenuation then the bump mapping doesn`t work right, and if I put the attenuation in tangent space it doesn`t work again , or maybe i`m not doing it right

04-18-2005, 12:54 PM
nevermind, i got it working, thanx