benilla-re systems structs docs

DrawOceanPass

function · terrain · host

Address
0x685010 · 407 bytes, up to 0x6851a6
Signature
void __cdecl (void)
Meaning
Draws the ocean liquid slots: swatch, program or add combine, blend, lights and the ocean fill
Confidence
verified, proof one
Finding
terrain/liquidpass#liquid-draw-passes
Test
terrain::chunk_liquid_pass1_offset_difftest

Finding: Liquid draw passes in terrain: liquid passes

The scene draws the terrain liquids in three passes over the slots of a layer's list: the ocean 0x685010 (type 1), the river 0x6851b0 (type 0) and the magma 0x6855a0 (type 2). Each returns at once for an empty list, pushes the device state, turns face culling off and pops at the end. Ocean and river bind their swatch on stage 0. With the fancy-water byte set they bind the pixel program, set the specular material white, the shininess 6.0, blend 2 (source alpha, one minus source alpha) and depth write off; otherwise no program and stage 1 combine preset 3 (add). The magma turns lighting and blending off and binds nothing.

The derivation is in the doc.

Callers 1

Callees 12

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