LightRange vs. Attenuation
BlitzMax Forums/OpenGL Module/LightRange vs. Attenuation
| ||
I will use SetLightRange in my 3d engine. But there are only attenuations factors. a = 1/(d²q + dl + c) a = Attenuation d = absoulute Distance between Light and Vertex q = Quadratic Attenuation l = Linear Attenuation c = Constant Attenuation a ist clamped to the intervall [0, 1] q, l and c must be greater or equal 0 In my advisement, I set q = 0, l = Sqr(1.0/LightRange) and c = 0... a = 1.0/(d*Sqr(1.0/LightRange)) But maybe, anyone have a better idea?! cu olli |
| ||
Out of my league ;-) |