Jump to content
  • Advertisement
Sign in to follow this  
Thaligar

preetham colors

This topic is 5049 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

i implemented the preetham paper for the sky successfully, more or less, as soon as the sun gets hided by the horizon the sky gets an ugly yellow color, and it's not black, plz hlp [depressed]

Share this post


Link to post
Share on other sites
Advertisement
I assume you mean the paper

http://www.cs.utah.edu/~preetham/papers/p91-preetham.pdf?

Difficult to reply to an implementation question without some implementation information.

Do not the figures 7 and 8 show the sky turning yellowish at sunset?

Share this post


Link to post
Share on other sites
yes, it turns at the sunset yellowish, but i got also at midnight a yellow horizon,
i load up my imp. as soon as possible,

cu Tgar [smile]

Share this post


Link to post
Share on other sites
I had some luck implementing that algorithm in my previous engine (will soon make the same shader in the new engine since I kept my old code), and initially had the same problem although it may have been caused by a math error that I corrected later. One thing that may be causing this are the RGB values by wavelength used in the actual paper are innaccurate. Use the standard RGB used with computer monitors. Yann posted these numbers in a post on the Graphics Programming and Theory forum to correct discoloration problems with this algorithm. Another solution if this doesn't fix it is to simply interpolate the sky's alpha values to 0 at night.

Share this post


Link to post
Share on other sites
thx once more Lithic, but have you got an idea when it should fade out, only a hint for me,

thx in advance Tgar [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!