BSP (Source)/Static prop flags
These flags are defined in public/gamebspfile.h
. Any undefined flags are unused by the engine and can be used by custom VRAD compilers to define additional light baking parameters (in conjunction with a modified VBSP that can write those flags).
Flags
This is 8-bit (unsigned char) in all versions of the static prop lump except for , where it is 32-bit (signed int).
Bit | Name | Dev comment | Description |
---|---|---|---|
0x01 | STATIC_PROP_FLAG_FADES | none | Set by engine at runtime if the model fades out at a distance. |
0x02 | STATIC_PROP_USE_LIGHTING_ORIGIN | none | Set by engine at runtime if the model's lighting origin is different from its position in the world. |
0x04 | STATIC_PROP_NO_DRAW (in all games since ) (removed since ) |
computed at run time based on dx level | Set by engine at runtime based upon mindxlevel and maxdxlevel . Does not work if set explicitly; set maxdxlevel to a low non-zero value such as 50 instead.
|
STATIC_PROP_NO_FLASHLIGHT (in all games since )[confirm] |
N/A (source code not public) | Set if disableflashlight is enabled.
| |
0x08 | STATIC_PROP_IGNORE_NORMALS (in all games since ) |
none | Set if ignorenormals is enabled.
|
0x10 | STATIC_PROP_NO_SHADOW | none | Set if disableshadows is enabled.
|
0x20 | STATIC_PROP_SCREEN_SPACE_FADE (removed since ) |
none | Set if disableshadows is enabled.
|
STATIC_PROP_MARKED_FOR_FAST_REFLECTION (in all games since ) |
N/A (source code not public) | Set if drawinfastreflection is enabled.
| |
0x40 | STATIC_PROP_NO_PER_VERTEX_LIGHTING (in all games since ) |
in vrad, compute lighting at lighting origin, not for each vertex | Set if disablevertexlighting is enabled.Contrary to the dev comment, this disables pre-baked lighting for the model altogether, making it lit the same way as CBaseAnimating props (ex: prop_dynamic ).
|
0x80 | STATIC_PROP_NO_SELF_SHADOWING (in all games since ) |
disable self shadowing in vrad | Set if disableselfshadowing is enabled.
|
0x100 | STATIC_PROP_NO_PER_TEXEL_LIGHTING (only in ) |
whether we should do per-texel lightmaps in vrad. | Set if generatelightmaps is disabled.If VRAD is fed an older version of the static prop lump with 8-bit flags, this flag is treated as always being enabled (not generating lightmaps for any props). This flag is only read by VRAD; the engine will load the the PPL file associated with a given prop regardless of this flag, provided STATIC_PROP_NO_PER_VERTEX_LIGHTING is disabled and the checksum in the PPL file matches the checksum found in specified MDL. |
FlagsEX
Counter-Strike: Global Offensive's static prop lump adds an extra 32-bit (signed int) set of flags, most of which are unused.
Bit | Name | Description |
---|---|---|
0x00000001 | STATIC_PROP_FLAGS_EX_DISABLE_SHADOW_DEPTH | Set if disableshadowdepth is enabled.
|
0x00000002 | STATIC_PROP_FLAGS_EX_DISABLE_CSM | Automatically set at runtime |
0x00000004 | STATIC_PROP_FLAGS_EX_ENABLE_LIGHT_BOUNCE | Set if enablelightbounce is enabled.
|