Jump to content
blueapples

DayNight with a skybox?

Recommended Posts

Doesn't the script replace the material in that object? I want to make sure the day night changes actually still work but swap out my own art for the day and night parts.

Share this post


Link to post

From my understanding, it works off of math calculations. Not by having an image rotate.

 

To change the color of the sky, you'd have to change the math behind it.

 

Look at daynight.shader.

 

Shadmar was very kind to comment it nicely.

Share this post


Link to post

Yeah I looked in there and there are basically no references to how to modify the color or distribution of stars, etc. There are a lot of equations but basically no explanation of what they do... Maybe you are looking at a different version?

Share this post


Link to post

To get the color of the sky, they calculate what an atmosphere does to light of the sun color.

 

See totalMie function in the shader.

 

I believe this is the paper Shadmar built this shader upon.

 

http://developer.amd.com/wordpress/media/2012/10/GDC_02_HoffmanPreetham.pdf

 

There's a comment on line 485 in the shader relating to star position.

 

"//stars" Although the original source is no longer found at the link "http://glsl.heroku.com/e#18186.0"

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...