logoalt Hacker News

whizzter • today at 11:43 AM • 0 replies • view on HN

If it's shadowmap based lighting you can trace through it.

Imagine a ray from the camera to the background pixel, sample the shadowmap along the way if the sample points along the camera ray lies within the shadowmap and add light if the shadowmap depth is further away (simplified, depending on number of lights,etc there's a number of possible optimizations but that should be googleable).