Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

project_lit_triangle

Function project_lit_triangle 

Source
pub fn project_lit_triangle(
    verts: [Vec3I16; 3],
    normals: [Vec3I16; 3],
    materials: [(u8, u8, u8); 3],
) -> [ProjectedLit; 3]
Expand description

Project three vertices via RTPT, then compute each vertex’s lit colour with NCCS.

This is the visual-preserving batched path for Gouraud meshes: projection work shares RTPT’s setup cost, but lighting still runs once per vertex so different normals and material tints produce the same RGB values as three project_lit calls.

Prerequisites are the same as project_lit: rotation/translation/projection registers and the light rig must already be loaded.