Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Day-Night Shader + Clouds

Author
Message
aki
15
Years of Service
User Offline
Joined: 8th Nov 2008
Location:
Posted: 8th Oct 2009 22:15 Edited at: 8th Oct 2009 23:26
Unfortunately, since there's currently no quality option for clouds for DBP, I've decided to port over a vastly oversimplified version of my atmosphere shader from C++. I made a poor example here, and a better version would use better colour choices for the sky and horizon, as well as fixing my formula for positioning the sun. Nonetheless, here's an easy-to-use shader and set of functions ready for use in your game.

-Supports day to night transitions
-Supports clouds & stars
-Shader based - fast to load, fast on fill rate

You can easily add special colors for dawn, dusk, midnight, noon, etc by setting them yourself and using the vector linear interpolation commands to adjust them, but I didn't spend the time to do it.

EDIT: For even less transparent clouds, change in the shader

to

Attachments

Login to view attachments
aki
15
Years of Service
User Offline
Joined: 8th Nov 2008
Location:
Posted: 8th Oct 2009 22:15
Horrible Screenshot Attached

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-05-04 12:27:00
Your offset time is: 2024-05-04 12:27:00