🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Improved the Photon Mapping

Published January 24, 2010
Advertisement
So I've managed to smooth the lighting out by using many fewer photons (3000 from 100,000), while giving each photon a much larger area of influence (~10x larger). To do this, I added a geometry shader that generates scaled screen aligned sprites, because the built in point sprites have a maximum size.

I fixed the lack of illumination of corners by having each photon act as two lights, incoming and outgoing, within its area of influence.

I've also changed the falloff of each photon to approximate a Gaussian distribution using [(1-x^2)/(1+x^2)]^2 (see a graph from WolframAlpha). Notice that it becomes zero after a finite distance along the x-axis, which prevents discontinuities at the edge of a photon's range of influence.

This is what it looks like now:

Previous Entry OpenCL
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement