Modes
Modes are different ways your shader will render under different passes or conditions.
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 activeMode( "mode_fallback.shader" )- uses a different shader for this mode
Your typical modes section might look like:
MODES
{
Forward();
Depth();
}
Supported Modes
Default | Used for compute shaders |
|---|---|
Forward | Standard rendering |
Depth | Depth prepass, shadows |
ToolsShadingComplexity | Shows Quad Overdraw |
Referenced API
Canonical API pages mentioned in this guide.
Angles.Forward
The forward direction vector for this angle.
Facepunch.ActionGraphs.InputDefinition.Default
If `Facepunch.ActionGraphs.InputDefinition.IsRequired` is false, this value will be used when no value is provided.
Facepunch.ActionGraphs.PropertyDefinition.Default
If `Facepunch.ActionGraphs.PropertyDefinition.IsRequired` is false, this value will be used when no value is provided.
Ray.Forward
Direction of the ray.
Rotation.Forward
The forwards direction of this rotation.
Sandbox.Audio.Mixer.Default
No summary available.
Sandbox.Bloom.Mode
No summary available.
Sandbox.Clothing.IconSetup.Mode
No summary available.