Material Flags

Material $flags and $flags2 parameters control how the material is rendered.

Material $flags and $flags2 parameters control how the material is rendered. $flag can be changed in real-time to allow changes in rendering, but $flags2 is read-only and assists the engine or other code in using the material correctly. Enumerations found in https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/public/materialsystem/imaterial.h

The flags can also be set via the .vmt Example:

#Sets the MATERIAL_VAR_VERTEXCOLOR and MATERIAL_VAR_VERTEXALPHA flag
UnlitGeneric
{
$basetexture brick/brickwall003a
$vertexcolor 1
$vertexalpha 1
}

$flags

$flags can contain the following flags:

$flags2

$flags2 can contain the following flags:

Last updated