
What is it
This is an engine modification I experimented with that adds an atmospheric scattering effect to materials.
You can place atmospheres in the editor and define parameters for Rayleigh and Mie scattering.
Currently implemented:
Partially pre-calculated scattering to speed up the rendering a bit.
Shadows from the shadowmap are taken into account.
Direct irradiance: The unscattered light received by objects within the atmosphere is attenuated correctly. (Objects in the sunset are getting reddish - at least for earth like atmospheres.)
Indirect irradiance: The glow of the atmosphere will affect an object's received ambient light.
* Multiple atmospheres in one scene - as long as they don't overlap.
You can find the fork here:
https://github.com/zwostein/godot/tree/atmosphere
There is a little project to demonstrate this:
https://github.com/zwostein/GodotAtmosphereDemo
Be aware that this requires a beefy GPU! Integrated GPUs work, but you might struggle with getting anywhere near a two-digit framerate...
Also, there are some graphical glitches, especially for objects touching the outer atmosphere boundary.
Atmosphere shadows can produce quite a lot of color-banding-like artifacts, too.
However, still fun to play around with.