Map 3D: the game's physical sky, light, haze and exposure from the timecycle (SIX-211) #286
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!286
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/286/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 15:05 UTC · original
holdmysocks:six-map3d→master· +1844 −43 · 11 files · 11 commits · merged 2026-11-25 18:33 UTCPart 1 of the Map 3D rebuild (SIX-211): the map renders an HDR frame lit by the game's own sky, from the timecycle. Builds on #276 (the timecycle table, merged).
What changes
sky_new_*variables describe the atmosphere: planet radius, atmosphere top (Karman line), Rayleigh and Mie scattering with their scale heights, Mie absorption and phase eccentricity, and a two-piece ozone layer (its constants match the usual ozone profile exactly).atmo.wgslrenders it with look-up tables in compute passes: transmittance (256 × 64) and multiple scattering (32 × 32) when the medium changes, then per frame the sky seen from the camera (192 × 108), a 32³ froxel volume of aerial perspective (40 km deep near the ground, out past the horizon from higher up) and a 6-direction ambient cube. The sun's disc (sky_sun_disc_size), a full moon opposite it, stars (sky_stars_*) and the night air glow (sky_air_glow_*) are drawn on top.sky_scattering_sun_illuminance, ~100 000 lux) ×light_dir_col×sky_scattering_sun_col×light_dir_sun_multreaches each point through the air (transmittance table), so a low sun turns orange and fades; the moon likewise. The sky's light is the ambient cube, scaled byambient_sky_intensity×indirect_light_sky_multiplier, plus sunlight bounced off lit surroundings (ambient_bounce_intensity× a 15 % ground albedo). Reflections read the sky table. The two height fog layers (local_atmosphere_fog_density/falloff/height, e.g. Misty, Fog) are applied per pixel.postfx_exposureas an offset). Baked map tiles are lit at 60 % of their colour (they carry their own light). Then bloom (postfx_intensity_bloom), contrast about its pivot, saturation and a filmic curve to the shown sRGB image.--weather W.Own choices (not decoded)
Incident-meter share, low-sun floor, bounce albedo, map tile reflectance, scale from the timecycle's colour values to scattering per km (so the defaults give the usual Earth atmosphere), moon illuminance (0.25 lux), star and air-glow brightness, night scenes metered up to 3 stops darker than mid grey, sun dimming by cloud cover (no clouds drawn yet), emissive brightness (6 cd/m² at strength 1), the filmic curve. Without a timecycle (no index), built-in Sunny values.
Checked
atmo::tests::shaders_validate). Scene layout, fallback sky and aerial depth tests pass.cargo check -p sixng-gui --testsgives no warnings, after merging master.cargo test -p sixng-gui atmo::passes. No panics and no wgpu validation errors in any run.