Skybox shader for spherical planet

Hello, I need your help, I’m wondering how to make a skybox for a planet using shaders, based on a day and night system similar to that in Astroneer

Screenshot from my project

The sky gradient and horizon on the skybox is a simulation of the planet’s local atmosphere: as you approach the horizon the haze thickens.

To get it to “move with you” as you walk around the planet, probably easiest to use two cameras layered atop each other: make one that never moves and only clears to the skybox, while the other camera that moves around the sphere would not clear or draw the skybox, just the planet and what you see walking around.

2 Likes

Thank you for replying, it’s interesting way to do it but when i’m doing it skybox locks on my second camera ofc, if i give to directional light rotation i still got a issue that sun dissapears at the horizon.

If you look at how Sebastian Lague did it in his spherical world, he made the skybox actually an inward-facing sphere, physically in the scene, with a bunch of clouds scattered inside that volume.

It does not simulate the atmospheric haze gradient at all.

1 Like

That’s it! I based my game on his tutorials i don’t know how i missed it, thank you very much for help!

1 Like