benilla-re systems structs docs

ProjectCloudLight

function · lighting · primitive

Address
0x6cf9c0 · 200 bytes, up to 0x6cfa87
Meaning
Projects the cloud light's direction onto the cloud sphere
Confidence
verified, proof one
Finding
lighting/clouds#cloud-colours
Test
lighting::sky_dome_ray_point_difftest

Finding: Cloud colours in lighting: clouds

Each texel with cover a > 0 gets alpha a and colour base + glow, each channel clamped to 1 and packed as bits(f32(c·255 + 512)) >> 14. base = band 10·p + band 11 with p = (((255 − a) >> 1) + 64)/255. glow = band 9·k when the angle term k is positive: k = cos θ · (1 − 0.75·w) · E(time), θ between (s − texel, 192·w + 64) and (slope, 1), s the light's texel position, w the storm weight and E the track at 0xce9ab8. The light is the sun disc from 04:50 to 22:10, else the white moon. A texel with no cover copies the previous texel's colour with alpha 0.

The derivation is in the doc.

Callers 1

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.