Story

Show HN: Interactive 3D Moon with real NASA data and WebGPU

oddurs Tuesday, February 24, 2026

A photorealistic Moon viewer running entirely in the browser. WebGPU primary renderer with WebGL 2 fallback.

- NASA CGI Moon Kit textures served via a quadtree LOD tile system - Oren-Nayar BRDF (lunar regolith is non-Lambertian with strong backscatter) - Sun position calculated from astronomy-engine (±1 arcminute) - Scrub through the full lunation cycle or watch in real time - Earth and Tycho-2 starfield in the background

Tech: Three.js with TSL shaders (compile to both WGSL and GLSL), React Three Fiber, Vite. The shading model was the most interesting part — standard PBR looks completely wrong for the Moon because regolith doesn't have a specular lobe; it actually gets brighter at opposition (the "opposition surge"). Oren-Nayar gets close enough for a web visualization.

Tile system is a geodetic quadtree similar to CesiumJS's approach. Zoom level picks based on screen-space error. Currently 7 levels deep which gets you to ~4 km/pixel at max zoom.

Would love feedback, especially from anyone who's worked with lunar data or WebGPU in production.

3 0
moon.oddurs.com
Visit article Read on Hacker News