benilla-re systems structs docs

BlendLightRecord

function · lighting · primitive

Address
0x6d67c0 · 710 bytes, up to 0x6d6a85
Meaning
Blends a light record into another by a clamped weight
Confidence
verified, proof one
Finding
lighting/daynight#record-blend
Test
lighting::sky_weighted_blend_difftest

Finding: Record blend in lighting: day-night

0x6d67c0 blends a source record into a destination by a weight t clamped to [0, 1] (NaN as 1). With a = the low byte of the bits of f32(t·255 + 512) shifted right by 14, colours +0x00 to +0x40 and +0x4c move each channel to dst + ((src − dst)·a >> 8), keep the destination's top byte, and take the source's three channels whole when a is 255. The floats +0x44, +0x48, +0x58 and +0x64 to +0x74 become dst + (src − dst)·t; +0x50, +0x54, +0x5c, +0x60 and +0x78 onward are kept.

The derivation is in the doc.

Callers 2

Callees 2

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