blueapples Posted August 21, 2016 Share Posted August 21, 2016 Any one figured out how to get shadmar's DayNight script to work with a skybox or otherwise change the blue sky color? Quote Link to comment Share on other sites More sharing options...
martyj Posted August 21, 2016 Share Posted August 21, 2016 You have to use a sphere with his shader as the skybox. 1 Quote Link to comment Share on other sites More sharing options...
blueapples Posted August 21, 2016 Author Share Posted August 21, 2016 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. Quote Link to comment Share on other sites More sharing options...
martyj Posted August 22, 2016 Share Posted August 22, 2016 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. Quote Link to comment Share on other sites More sharing options...
blueapples Posted August 22, 2016 Author Share Posted August 22, 2016 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? Quote Link to comment Share on other sites More sharing options...
martyj Posted August 22, 2016 Share Posted August 22, 2016 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" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.