Oh atmosphere with your light scattering and all your fancy equations how you kill me. I poured over a lot of white papers and Sean O’neils atmosphere shaders, but I just couldn’t get them to work right. I ended up using a simplified version of his sky shader, and came up with my own shader for the ground. The effect isn’t ultra-realistic, but that isn’t what I’m going for. I would like the shader to be flexible, but for now it gets the idea across that this is a fantasy-esque environment and that you are meant to play.
I added starlight to the dark side of the planet so players will still be able to accomplish things at “night”. Still might need to add more moonlight though or make night time artificially short by speeding up the planet rotation or something.
I did make the planet rotate and the light rotate which is nice and now it looks like I have a glorified screensaver. Huzzah.
On the todo list for a few things to tweak next are: terrain look up table tweak and texture tweak, add some noise to the table, but try to preserve a fantasy/cartoony look, add a sun glow in the sky so I can tell where it is and make the mie scattering line up with that sun glow. I’d also like to make the water not look so deep by making it aware of the height of the terrain under it, but I might update the water mesh before I get to that -right now it is just a simple sphere primitive with no LOD and the UV is very squished at the poles.
I need to ask Mr. O’Neil if it is OK for me to share the modified shaders, but I imagine he’ll say yes. In other news be sure to check out Ysaneya’s latest dev journal post to see what a real pro can do! I just noticed he’s pushing 500k tri’s with more complex shaders than me and a MUCH larger planet, and I’m only doing 80k tri’s with less complex shaders and a small planet and his framerates are higher *sigh*