feat/cloud-shadows-terrain #113

Merged
akadmin merged 3 commits from feat/cloud-shadows-terrain into main 2026-07-12 17:03:44 +00:00
Owner

closes #36

closes #36
The main PBR shader multiplies a cloud transmittance into light 0's
shadow factor: flat-plane projection along the sun ray to the cloud
shell, the cloud march's cheap density (wind-scrolled weather coverage
x one base-shape tap at the cloud type's height-band center), Beer's
law over the slant path. Parameters ride two new LightsData vec4s
(496 -> 528 bytes) plus sky_ambient.w (cloud-type bias); the weather
map and base-shape noise bind at set 2 bindings 2-3, rebuilt with the
cloud/precip sets on Sky.weather_map override changes. Strength is 0
unless the atmosphere sky has clouds, so HDR/sky-less scenes are
bit-identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
noisegen bakes overcast-implies-rain into the weather map's G from the
map's RAW coverage, so the shaders' max(map G, storm-from-coverage)
rule rained even with the coverage slider pulled low — the baked G
bypassed the slider entirely. Gate the derived precipitation in all
three copies of the rule (cloud march, precip pass, cloud-shadow tap)
by smoothstep(0.7, 0.8, Sky.coverage): rain is an author decision —
the sky stays dry (no rain, no rain-forced deck, whatever the map's
baked G says) below slider 0.7, and storms fade in above it where the
deck is overcast.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: marched top-down cloud shadow map with distance falloff (ADR-0059)
All checks were successful
CI / build (pull_request) Successful in 3m36s
6c51442cc2
The single inline tap read too faint: the coverage remap zeroes most
texels below heavy coverage. Replace it as the primary source with a
per-slot 512² R16F cloud shadow map — a top-down 16-step
sun-transmittance march at full density quality (weather coverage x
base shape x height gradient x detail erosion) over a texel-snapped
8192 m box centered on the camera's sun-projected base-plane point,
recorded beside the shadow pass whenever the atmosphere sky has
clouds. fragment.glsl looks the map up once per fragment inside the
box and blends to the old inline single tap over the border, so shadow
quality falls off with distance instead of ending at an edge.

LightsData grows 528 -> 544 bytes (cloud_shadow_box lanes); the map
binds at set 2 binding 4 and is cleared to 1.0 at creation so
sampling is defined in scenes that never render one; the map pass's
noise set and the per-slot set 2 rebuild together on Sky.weather_map
overrides. ADR-0059 revised to the hybrid design.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
akadmin deleted branch feat/cloud-shadows-terrain 2026-07-12 17:03:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
akadmin/NemesisEngine!113
No description provided.