Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A standalone atmosphere shader

License

NotificationsYou must be signed in to change notification settings

Dimev/atmosphere-shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

Plan for the chapman function

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

Plan for multiple scattering

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp