-
Notifications
You must be signed in to change notification settings - Fork 1
Shading Modes
Matthew LaRocca edited this page Jun 6, 2025
·
6 revisions
A material's shading mode determines how a mesh will be drawn by the renderer.
During export, the system will determine a default shading mode to use based on a primitive's attributes and material.
This value can be overridden by assigning the shadingMode
custom attribute to the material. The value specified in the custom property field should contain a value from the Name
field below.
Note: When exporting from blender, ensure that "Custom Properties" is selected from the Include menu.
A material's shading mode can be changed at runtime by using the fw64_material_set_shading_mode
function.
Name | Code Define | Description |
---|---|---|
Unlit | FW64_SHADING_MODE_UNLIT | No lighting calculations performed. Color = VertexColor * Material Color |
UnlitTextured | FW64_SHADING_MODE_UNLIT_TEXTURED | No lighting calculations performed. Color = Vertex Color * Texture Color |
Lit | FW64_SHADING_MODE_LIT | Color = Lighting calculations performed. Color = Shade value * Material Color |
LitTextured | FW64_SHADING_MODE_LIT_TEXTURED | Lighting calculations performed. Color = Shade Value * Texture Color |