You are browsing as a guest. Sign up (or log in) to start making projects!

2h 26m 8s logged

Devlog #4 - Coding a Custom Sun & Planet Shader for My Space Mod!

I finally got around to adding the skybox, the sun, and all of the space effects to my mod! For the sun shader, I wanted it to look super bright and alive instead of just a flat texture. I wrote a shader that procedurally generates solar granules and convection cells using 3D noise (FBM) so it looks like it’s churning. Then, I disabled the ACES tonemapping clamp on the sun itself. This lets it output raw HDR values up to 18.0, making it act as an actual light source that triggers a massive, blinding emission.
The biggest headache was the bloom disappearing whenever the sun went slightly off-screen. To fix it, I split the bloom into two parts: the screen-space lens flares (ghosts, streaks) and the massive ambient Rayleigh/Mie scattering. I rewrote the scattering math to run in 3D using the angle of your camera relative to the sun. Now, even if you look completely away, the massive orange and blue sun glow naturally wraps around the edges of your screen. I also added some dynamic wobbling and chromatic aberration to the anamorphic streaks to make the camera lens feel real.
This is just the first beta, but I’m really liking how it looks for now! The planets are also looking way better now too, I added a back-lit refraction glow that bends light around their dark sides, and boosted their atmospheric scattering so they actually bloom when the light hits them. Still got a ton of space stuff to research and code, but this is a solid start.

0
6

Comments 0

No comments yet. Be the first!