BSP (Source)/Static prop flags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 18: Line 18:
| Set by engine at runtime
| Set by engine at runtime
|-  
|-  
| 0x00000004<br>{{removed|{{portal2}}}}
| 0x00000004<br>{{since|{{src07}}}}<br>{{removed|{{portal2}}}}
| STATIC_PROP_NO_DRAW
| STATIC_PROP_NO_DRAW
| computed at run time based on dx level
| computed at run time based on dx level
Line 26: Line 26:
| STATIC_PROP_NO_FLASHLIGHT
| STATIC_PROP_NO_FLASHLIGHT
| N/A (source code not public)
| N/A (source code not public)
| Set by engine at runtime
| Set if {{code|disableflashlight}} is enabled.
|-  
|-  
| 0x00000008
| 0x00000008<br>{{since|{{src07}}}}
| STATIC_PROP_IGNORE_NORMALS
| STATIC_PROP_IGNORE_NORMALS
| none
| none
|  
| Set if {{code|ignorenormals}} is enabled.
|-  
|-  
| 0x00000010
| 0x00000010
| STATIC_PROP_NO_SHADOW
| STATIC_PROP_NO_SHADOW
| none
| none
|  
| Set if {{code|disableshadows}} is enabled.
|-  
|-  
| 0x00000020<br>{{removed|{{portal2}}}}
| 0x00000020<br>{{removed|{{portal2}}}}
| STATIC_PROP_SCREEN_SPACE_FADE
| STATIC_PROP_SCREEN_SPACE_FADE
| none
| none
|  
| Set if {{code|disableshadows}} is enabled.
|-  
|-  
| 0x00000020<br>{{since|{{portal2}}}}
| 0x00000020<br>{{since|{{portal2}}}}
| STATIC_PROP_MARKED_FOR_FAST_REFLECTION
| STATIC_PROP_MARKED_FOR_FAST_REFLECTION
|  
| N/A (source code not public)
|  
| Set if {{code|drawinfastreflection}} is enabled.
|-  
|-  
| 0x00000040
| 0x00000040<br>{{since|{{src06}}}}
| STATIC_PROP_NO_PER_VERTEX_LIGHTING
| STATIC_PROP_NO_PER_VERTEX_LIGHTING
| in vrad, compute lighting at lighting origin, not for each vertex
| in vrad, compute lighting at lighting origin, not for each vertex
|  
| Set if {{code|disablevertexlighting}} is enabled.
|-  
|-  
| 0x00000080
| 0x00000080<br>{{since|{{src06}}}}
| STATIC_PROP_NO_SELF_SHADOWING
| STATIC_PROP_NO_SELF_SHADOWING
| disable self shadowing in vrad
| disable self shadowing in vrad
|  
| Set if {{code|disableselfshadowing}} is enabled.
|-  
|-  
| 0x00000100<br>{{only|{{src13mp}}}}
| 0x00000100<br>{{only|{{src13mp}}}}
| STATIC_PROP_NO_PER_TEXEL_LIGHTING
| STATIC_PROP_NO_PER_TEXEL_LIGHTING
| whether we should do per-texel lightmaps in vrad.
| whether we should do per-texel lightmaps in vrad.
|  
| Set if {{code|generatelightmaps}} is disabled.
|-  
|-  
|}
|}

Revision as of 10:20, 17 September 2024

These flags are defined in 🖿public/gamebspfile.h.

Flags

This is 8-bit in all versions of the static prop lump except for Source 2013 Multiplayer, where it is 32-bit.

Bit Name Dev comment Description
0x00000001 STATIC_PROP_FLAG_FADES Set by engine at runtime
0x00000002 STATIC_PROP_USE_LIGHTING_ORIGIN Set by engine at runtime
0x00000004
(in all games since Source 2007)
(removed since Portal 2)
STATIC_PROP_NO_DRAW computed at run time based on dx level Set by engine at runtime
0x00000004
(in all games since Portal 2)
STATIC_PROP_NO_FLASHLIGHT N/A (source code not public) Set if disableflashlight is enabled.
0x00000008
(in all games since Source 2007)
STATIC_PROP_IGNORE_NORMALS none Set if ignorenormals is enabled.
0x00000010 STATIC_PROP_NO_SHADOW none Set if disableshadows is enabled.
0x00000020
(removed since Portal 2)
STATIC_PROP_SCREEN_SPACE_FADE none Set if disableshadows is enabled.
0x00000020
(in all games since Portal 2)
STATIC_PROP_MARKED_FOR_FAST_REFLECTION N/A (source code not public) Set if drawinfastreflection is enabled.
0x00000040
(in all games since Source 2006)
STATIC_PROP_NO_PER_VERTEX_LIGHTING in vrad, compute lighting at lighting origin, not for each vertex Set if disablevertexlighting is enabled.
0x00000080
(in all games since Source 2006)
STATIC_PROP_NO_SELF_SHADOWING disable self shadowing in vrad Set if disableselfshadowing is enabled.
0x00000100
(only in Source 2013 Multiplayer)
STATIC_PROP_NO_PER_TEXEL_LIGHTING whether we should do per-texel lightmaps in vrad. Set if generatelightmaps is disabled.

FlagsEX

Counter-Strike: Global Offensive Counter-Strike: Global Offensive's static prop lump adds an extra 32-bit set of flags, most of which are unused.

Bit Name Description
0x00000001 STATIC_PROP_FLAGS_EX_DISABLE_SHADOW_DEPTH
0x00000002 STATIC_PROP_FLAGS_EX_DISABLE_CSM Automatically set at runtime
0x00000004 STATIC_PROP_FLAGS_EX_ENABLE_LIGHT_BOUNCE