🎉 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!

Rendering the sun with atmospheric scattering

Started by
2 comments, last by RobM 2 years, 4 months ago

I’ve implemented atmospheric scattering in my engine, of sorts at least. I’ve done it as a post process and, to be fair, it looks pretty good. I’ve based it on the utterly brilliant Sebastian Lague’s Coding Adventures series. Even though it’s based on planet rendering, I’m using it for my static non-planet terrain pretty nicely.

Thing is, there’s no sun. What I’d like is to be able to render the sun with a nice halo around it that merges in with the sunset/sunrise. Can anyone point me at any documentation/tutorials that explains how to do this? Obviously I can render a sun quad but I want it to interact with the atmosphere properly and whilst Seb’s tutorial is great, it doesn’t explain how to do the sun part.

Advertisement

This seems simple and nice:

https://www.shadertoy.com/view/slSXRW

Did not look at any such stuff in detail yet. Do you think it's a proper example?

Actually that looks pretty nice, thanks Joe. My research seemed to miss that one.

This topic is closed to new replies.

Advertisement