Chalnoth said:Well, I think the problem with this approach is that the first cone is easy to compute. But for the second cone you're going to have to do something that's object-dependent, such as move the light source towards or away from the object.
Huh?? :?
Finding those cones is extremely simple, and has nothing to do with the object. The two different cones are defined by the size of your lightsource. The first cone comes from one side of the lightsource, and the second from the other side.
When the lightsource if uniform, the gradient will be lineair.