Modes are different ways your shader will render under different passes or conditions.

A mode can be specified in three ways:

  • Mode()
  • Mode( S_MODE_COMBO ) - sets the combo when this mode is active
  • Mode( "mode_fallback.shader" ) - uses a different shader for this mode

Your typical modes section might look like:

MODES
{
    VrForward();
    Depth();
    ToolVis( S_MODE_TOOLS_VIS );
}

Supported Modes

Default Used for compute shaders
VrForward Standard rendering
Depth Depth prepass, shadows
Reflection SSR pass (removed in future)
ToolsShadingComplexity Shows Quad Overdraw
ToolsVis Used when mat_fullbright is set g_nToolsVisMode will be populated.
ToolsUtil Stuff that only draws in tool views





Created 6 Dec 2024
Updated 9 Dec 2024