Precomputed Atmospheric Scattering


#1

Interesting implementation: https://ebruneton.github.io/precomputed_atmospheric_scattering/


#2

It is a fantastic implementation (even better now that the codebase has been rewritten), highly GPU compliant with beautiful results… as seen in several videos like this.


#3

You can check out Bananaft’s Zarevo experiment, it does have some nice atmospheric scattering among other stuff.


#4

This stuff is damn beautiful. How expensive is the precomputation? Is it something that could feasibly happen in game, or does it take hours (eg. for the stuff that @Bananaft did) … ? I would love to have generate geometry and precompute lighting “just in time” before it was visible to the player.


#5

Hello. My method is fully dynamic. Its also just an artistic coding and has nothing to do with physics.

Here is the basic formula:
https://www.shadertoy.com/view/MdtXD2
And another version with more mild colors:
https://www.shadertoy.com/view/ldyXRz
You can drag sun with mouse in both of them.

In terms of performance it’s pretty light for a modern system.
Current github version is a bit broken, sorry.


#6

Oh, very cool – I just looked at the images and assumed you were using the same technique.

Has anyone tried Eric Bruneton’s code? I got about half way through attempting to compile the sources on OSX, but gave up. I’ll have a go on my Linux box when I get back to it …