Skip to main content

Module material

Module material 

Source
Expand description

Model material classification and the character outfit atlas, shared by the viewer and the game so both draw a material the same way.

Enums§

MaterialKind
Which ported model shader a range uses, from its material instance’s base material.

Constants§

CHARACTER_OUTFITS
NormalSkin_charactervs (c5.z = 0.125): the character texture holds 8 outfits side by side.

Functions§

character_uv_transform
The texture transform of a citizen’s outfit, as a scale and offset for uv * xy + zw. The character texture holds 8 outfits side by side, and the shader computes the diffuse U as (u + outfit) / 8, where u is the vertex texture coordinate (/512) and outfit is 0 to 7.