Sign in to follow this  

Atmospheric Scattering K constant

This topic is 2846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In Nishita's paper, "Display of the Earth Taking into Account Atmospheric Scattering", they define a constant K = 2*Pi^2 * (n^2 - 1)^2 / (3N) where n = 1.0003 is the index of refraction of air and N is the molecular number density of the standard atmosphere. If using meters, N is around 2.504e25f; If you actually compute K out you get 9.31 X 10^(-32). I could not get this to work in my pixel shader (I'm thinking it is a precision issue, and values were showing up as 0 in PIX that I know were not 0). Anyway, Sean O'Neil uses: K = 0.0025f; but he does not derive it, although he bases his approach on Nishita, too. So does anyone know how he gets that? Also he defines: m_fWavelength[0] = 0.650f; // 650 nm for red m_fWavelength[1] = 0.570f; // 570 nm for green m_fWavelength[2] = 0.475f; // 475 nm for blue So it looks like he is using micrometers? Does that mean everything needs to be converted to micrometers for this to work (distances used for extinction and etc. ?)

Share this post


Link to post
Share on other sites

This topic is 2846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this