Hello,
I'm currently adding light attenuation to my shaders. (forward rendering)
The formula I'm using is the following:
attenuation = 1 / (attConst + attLinear * dist + attExp * dist * dist);
Now the real problem is how to put Fbx values in relation to that formula.
So far I have plugged what fbx call DecayStart as my attExp variable. It seams DecayStart is in the range 0..100 so I'm multiplying it by 0.01
Now I think this is not really what maya or 3dsMax are doing...
Fbx has also:
NearAttenuationStart
NearAttenuationEnd
FarAttenuationStart
FarAttenuationEnd
So now I'm really not sure how to compute all those, I mean I could invent something of course but I'd prefer something that is commonly used.
Is there a new attenuation formula I should use ?
Does anybody know Fbx enough to teach me how to plug all those variable together in a nice attenuation function.
Thx a lot.