Map 3D: cloud noise baked once into a repeating texture (cheaper clouds) #361
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!361
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/361/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-26 06:00 UTC · original
holdmysocks:six-map3d-cloudtex→master· +138 −18 · 3 files · 2 commits · merged 2026-11-26 06:54 UTCThe clouds' cover noise (four octaves of value noise) used to be computed for every sample along every cloud ray, and again for the light through the cloud above each sample and for the cloud shadow on every lit surface. It is now baked once at start into a 2048² half-float texture that repeats every 32 noise cells (80 km, farther than the clouds are drawn). Each of those lookups becomes one filtered texture read.
atmo.rs: the bake (the shader's hash and value noise with the lattice wrapped per octave, so the texture tiles), plus bindings 26 (texture) and 27 (repeating sampler) in the scene's part of group 0.shader.wgsl:cloud_densityreads the texture; the analytic noise is removed.cloud_noise_tiles(the noise wraps at the period, and the baked range covers the cover threshold's range).To verify on the second PC: GPU main pass time at w1 with and without
--no-clouds, against #339's +6.8 ms; and the look (no tiling, no blockiness at the edges, the same amount of cloud).