# Atmospheric Scattering K constant

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

## 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. ?)

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 15
• 9
• 10
• 13
• ### Forum Statistics

• Total Topics
633004
• Total Posts
3009837
• ### Who's Online (See full list)

There are no registered users currently online

×