Developer builds 3D globe world clock with real-time day/night shader
A developer created Timetate, a world clock and meeting planner built around a 3D globe that visually displays the real-time day/night terminator tracking the sun's position. The globe is constructed from three concentric spheres handling the Earth surface, cloud layer, and atmospheric glow respectively, using five WebP texture maps kept at 1024px for mobile performance. The sun's direction is calculated without an astronomy library by deriving solar declination and subsolar longitude from the current UTC time and day of year. The simplified solar model can be off by up to 16 minutes, which the developer argues is acceptable since the error is smaller than the visual softness of the terminator band itself. A key technical challenge involved correctly passing world-space versus view-space normals in the vertex shader to ensure accurate lighting across the globe.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in