You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Asset Preparation
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.
Runtime
A material's shading mode can be changed at runtime by using the fw64_material_set_shading_mode function.
Built in Shading Modes
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