- Notifications
You must be signed in to change notification settings - Fork0
A standalone atmosphere shader
License
Dimev/atmosphere-shader
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A standalone atmosphere shader for SHADERed and shadertoy (https://www.shadertoy.com/view/wlBXWK)
This repo is meant as a way to research and explain a (somewhat simple) atmospheric scattering implementation
Roadmap:
- chapman function for approximate optical depth
- better overall integrator (partly done already)
- planet shadow
- multiple scattering
A good approximation can be found here:https://zero-radiance.github.io/post/analytic-media/However, it would be nice to keep this function simple, without any erfc, and sqrt, which could result in a fully analytical atmospherehttps://www.shadertoy.com/view/4lVGRy uses a manual fit to the IE table for precomputed scattering, which might work good enough for thisThis:https://www.shadertoy.com/view/XlBfRD renders the atmosphere back to frontWhat does this allow? alpha blending, effectively you calculate scattering for a segment, then blend it with all segments behind each otherThis reduces an exp(-x) you have to put the entire segment scattering into, some other form of order-independant transparency could also work
Space glider (https://www.shadertoy.com/view/MdGfDG) big shader, can be slow to loadalready does this, by using the delta-eddington stuffidk how this works, but it's effectively adding the rayleigh color to the unshadowed part of the atmoIt's kinda hacky but it works
If the above works and a fully analytical atmo is possible, it might be possible to integrate it over an angle, and get multiple scattering from there
About
A standalone atmosphere shader
Resources
License
Uh oh!
There was an error while loading.Please reload this page.