Light range

In tools like 3D Max, Unity3D, I see that the range of light can be adjusted. In Max, there is Inner range and outter range. I have no idea what does inner range mean.
I` m wondering how to implement this in OpenGL.


With fixed-func, you’re limited to , I guess.
With GLSL, you can try to approximate the 3ds light.

Thanks. As I` m working on OpenGL ES, I think there is no SL at all

Depends if it is GL ES 1.1 or 2.0 …

Light range is a conceptual hack for optimization that has no basis in reality. You will only be able to support this is you have OpenGL ES 2.0 or other software tricks in OpenGL ES 1.x

one way to emulate light range with fixed function HW (es1.1), is to encode your range in an alpha texture, use world texgen to look it up, and alpha test your pixel if it is outside of the range.

however this requires multipassing if you want to still output some value for your pixel outside of the range.