benilla-re systems structs docs

LerpColourBytes

function · lighting · primitive

Address
0x6d51e0 · 143 bytes, up to 0x6d526e
Meaning
Moves a colour's low three bytes toward another's by weight/256, copying at 255
Confidence
verified, proof one
Finding
lighting/fog#light-colours
Test
lighting::dn_channel_lerp8_difftest

Finding: Light colours in lighting: fog and the world light

After each table build 0x6d37e0 derives the light colours at state +0x168 onward: diffuse (+0x174) is colour band 0 and ambient (+0x178) band 1. The window diffuse (+0x17c) is the 8-bit blend of band 0 toward band 1 at a = 0x80 with a zero top byte; the window ambient (+0x180) is band 1 blended toward band 0 at 0x80, then 16 added to each channel saturating at 255, top byte 0xff. +0x184 to +0x190 hold ambient with its HSV saturation ×0.33 and value ×1.25 as three floats and 1.0, and +0x194 is band 1 with each channel (c + 3)·85 >> 8 under the red byte of band 8.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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