Riviera
A 3D map of the hills around Mougins, from the coast at Cannes to the pre-Alps above Grasse.
Starting renderer… Drag to orbit, Shift-drag to pan, pinch or hold Ctrl or ⌘ while scrolling to zoom.Drag sideways to turn the map, and pinch with two fingers to zoom and move it.
Elevation data from Terrain Tiles (Mapzen/Tilezen) on AWS Open Data. EU-DEM produced using Copernicus data and information funded by the European Union. SRTM courtesy of NASA/USGS. Sources. Land cover: © ESA WorldCover project 2021 / Contains modified Copernicus Sentinel data (2021) processed by ESA WorldCover consortium. CC BY 4.0, ESA WorldCover.
// Contour lines aren't geometry: each pixel measures its distance to the
// nearest contour through screen-space derivatives, so lines stay ~1px wide
// from the coast to the far ridges. TSL compiles this to WGSL and GLSL.
const coord = heightM.div(interval);
const f = fract(coord);
const width = fwidth(coord);
const line = float(1).sub(smoothstep(width.mul(0.5), width.mul(1.5), min(f, f.oneMinus())));
// Every fifth contour is heavier, slopes facing away from the light darker.
// The normal comes from precomputed slopes, so it follows the depth slider.
const shade = max(dot(normal, light), 0);
const ink = max(line.mul(0.62), major).mul(mix(1, 0.35, shade));
material.colorNode = mix(background, foreground, ink);