Notes
- Each
sh_material_pass_tmaps 1:1 to apvr_poly_hdr_t. The compile step ispvr_poly_compile()with the right context flags. - Multi-pass = same vertices submitted multiple times, once per pass, each to the appropriate PVR2 list.
- Bump mapping pass uses offset color for K1/K2/K3/Q (per SPECTRE Q-004). Must be FLAT shading.
- Lightmap pass uses
PVR_BLEND_ZERO/PVR_BLEND_DESTCOLORfor multiplicative blend. - Max 4 passes keeps it simple. No game needs more than base + lightmap + bump + env.
Spec 5:
Compositor / Render Pipeline (shachi/compositor.h)
Problem
A game needs to render multiple views: main scene, VMU display, debug overlay, minimap. Each view has its own camera, stage, and output target. PVR2 renders in a begin_scene/end_scene cycle. The compositor orders and executes these views.