In a real-time rendering program, when a light hit a plane and reflected, how to calculate the attenuation(by distance) for the reflected light?


This is conceptually a bit perplexing because it is a bit counter intuitive. You do not account for it. Why not?

Lets assume the plane covers atleast one pixel at the furthest distance. It is true that the light attenuates like a point light. But see there is another point light right next to it, and another point. This cancels the effect. So yes individual point of reflection contributes less but you see more points *

Smaller than pixels its the job of the aa and filtering.So the only thing you really need to account for is participating media. In other words most often just atmospheric haze which is mostly just distance to target.

Another way to look at it is that a ray does not atenuate. Its the samplig of the rays that handles the attenuation.

* in a way this is lucky for us. If it werent then we would fail to see a lot of things.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.