CMapChunk::DrawLayersShader
function · terrain · host
- Address
0x6bf690· 1106 bytes, up to0x6bfae1- Signature
void __thiscall (CMapChunk *this, void *batch, void *shader)- Meaning
- Draws a chunk's layers in one pass with the combined texture and a pixel program
- Confidence
- verified, proof one
- Finding
- terrain/render#chunk-layers-in-one-pass
- Test
terrain::texgen_scale_recip_difftest,terrain::neg_fvar1_difftest,terrain::detail_texgen_scale_difftest,terrain::cam_relative_negate_difftest,terrain::texgen_apply_difftest
Finding: Chunk layers in one pass in terrain: render
On the shader path one program draws every layer: each layer's texture sits on its own stage i with the coordinates generated from the position (state 0x2f + i = 2, matrix enable 0x37 + i) and the matrix of the multipass stage 0, translated for an animated layer in the same way; the combined texture takes the stage after the last layer with the matrix of stage 1. A layer whose texture is missing sends the chunk to the flat draw.
The derivation is in the doc.
Callers 1
- CMapChunk::DrawLayers terrain
Callees 12
- GetTextureDeviceObject gx
- GxRsSetWord gx
- GxRsSetFloat gx
- GxRsSet gx
- GxRsSetObject gx
- GxPrimRenderOne gx
- 0x58b210 gx
- 0x58b220 gx
- 0x58b250 gx
- CMapChunk::DrawFlat terrain
- TranslateMatrix cmath
- ScaleMatrix cmath
Calls and jumps by a bare address, from tables/calls.tsv.