
Lab notes
This experiment is a full-screen Earth built in Three.js with custom shaders. Day and night textures blend across a terminator, clouds and water glints sit on top, and a thin atmosphere shell wraps the planet with a soft rim glow.
A small control panel lets you move the sun and tune atmosphere colors live. The goal was a readable planetary look—not a simulation of every climate model.
Techniques
Day/night mixing based on how much each surface faces the sun. Cloud coverage from a packed texture channel. Specular highlights limited to water. Fresnel rim lighting for atmosphere, including a twilight tint near the terminator.
The atmosphere is a slightly larger transparent shell around the Earth so the glow sits outside the surface instead of painting flat on top of it.
Stack
Three.js, custom GLSL (vertex + fragment), Vite, vite-plugin-glsl, lil-gui, OrbitControls. Textures for day, night, and specular/clouds. Deployed as a static WebGL build on GitHub Pages.