benilla-re systems structs docs

CGxDeviceD3d::ApplyCombinePreset

function · gx · orchestration

Address
0x5a2dd0 · 80 bytes, up to 0x5a2e1f
Signature
void __thiscall (CGxDeviceD3d *this, uint32_t stage, uint32_t preset)
Meaning
Sets a stage's colour and alpha operation from the preset tables 0x80a25c and 0x80a274
Confidence
verified, proof one
Finding
gx/renderstate#texture-stage-combine

Finding: Texture stage combine in gx: render state

A stage's combine preset (ids 0x1f to 0x26, values 0 to 5) selects Direct3D operations from 0x80a25c (colour: 4, 4, 13, 7, 5, 12) and 0x80a274 (alpha: 3, 4, 3, 7, 5, 3), as D3DTOP values, or an OpenGL record of the table 0x85c250 (six records of 0x2c bytes). OpenGL sets GL_COMBINE with the record's scales and sources (0x59bc79), or only the texture environment mode where the combine extension is missing.

presetcolour (D3D, GL)alpha (D3D, GL)
0modulate, modulatearg 2, previous
1modulate, modulatemodulate, modulate
2blend texture alpha, interpolatearg 2, previous
3add, addadd, add
4modulate 2x, modulate with scale 2modulate 2x, scale 2
5blend diffuse alpha, interpolatearg 2, previous

The derivation is in the doc.

Callers 2

Callees 1

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