shachi/include/shachi/material.h
(219 lines)
- C99 header implementing SPECTRE Spec 4
- Constants:
SH_MATERIAL_MAX_PASSES=4
- Enums:
sh_list_type_t (OP/TR/PT/NONE),
sh_tex_filter_t (NONE/BILINEAR/TRILINEAR),
sh_tex_env_t (REPLACE/MODULATE/DECAL/ALPHA),
sh_uv_clamp_t, sh_blend_func_t,
sh_depth_compare_t, sh_cull_mode_t,
sh_shade_mode_t, sh_fog_mode_t — all mapping
to PVR2 constants
sh_material_pass_t: list_type, texture_addr,
tex_filter, tex_env, uv_clamp, blend_src/dst, depth_compare/write,
cull_mode, base/offset_color, shade_mode, fog_mode
sh_material_t: pass_count, passes[4], name[32]
- Compilation:
sh_material_pass_compile → pvr_poly_hdr_t,
sh_material_compile_all
- Constructors:
sh_material_init,
sh_material_opaque, sh_material_transparent,
sh_material_punchthrough,
sh_material_lightmapped,
sh_material_bumpmapped,
sh_material_envmapped
- Utilities:
sh_material_copy,
sh_material_equals, sh_material_tex_size