Material map compile flags
Several special shader parameters exist that start with a %
sign instead of $. These are read by the compile tools to alter the properties of the face or the brush they are attached to. Most are intended to produce the special tools/
textures, but they may also be used for other materials.
All flags are boolean properties and invisible to players. So far %CompileLadder is the only flag which may be visible to players, depending on the proxies inside the material. %CompileTeam Is also the only flag that is not a boolean.
See also Tool Textures for more detail about the propeties of individual materials.
LightmappedGeneric { $basetexture developer/custom_clip %compileclip 1 }
Exclusive Flags
Only one of the following flags may be set on any given material.
Every flag is available in all Source Engine branches, unless specifically mentioned in the Availability
box
Clips
Name | Seen in .vmt | Availability | Effect |
---|---|---|---|
%CompileClip | toolsclip | Makes the brush block only players and NPCs. This is equivalent to a combination of %PlayerClip and %CompileNPCClip. | |
%CompileNPCClip | toolsnpcclip | Makes the brush block only NPCs. This implies NoLight and NoDraw. | |
%PlayerClip | toolsplayerclip | Makes the brush only block players. | |
%CompilePlayerControlClip | toolscontrolclip | (removed since )(also in ) | Unsure as to how this was meant to be used. Usually seen together with func_vehicleclip .Material also uses $surfaceprop player_control_clip |
%CompileGrenadeClip | toolsgrenadeclip | (only in ) | Makes the brush only block grenades. |
%CompileDroneClip | toolsdroneclip | (only in ) | Makes the brush only block drones. |
Other
Name | Seen in .vmt | Availability | Effect |
---|---|---|---|
%Compile2DSky | toolsskybox2d | Makes the face render the 2D Skybox only, in addition to emitting light_environment light. | |
%CompileFog | ToolsFog | This may be a deprecated flag that so far has not been seen as being useful. | |
%CompileNoChop | Prevents subdividing patches on the surface. Also affects how the face is converted to triangles. | ||
%CompileNoLight | nolight | (in all games since )(also in ) | Disables generating lightmaps for a brush face. Useful for materials that don't need lighting info or are always invisible. This is disabled on water materials.
Confirm: Is this necessary for UnlitGeneric materials?
|
%CompileOrigin | toolsorigin | Deprecated:Sets the rotation origin of a brush entity.
Leftover from ORIGIN in . Still functional in some branches (such as ), but is no longer necessary. | |
%CompileSkip | toolsskip | Removes the face during compilation, making the brush into sets of planes. | |
%CompileSky | toolsskybox | Makes the face render the (2D/3D) Skybox and emit light_environment light.
| |
%CompileTrigger | toolstrigger | Makes the brush suitable for Triggers. |
Additive Flags
Multiple of the following flags may be applied to any given material.
Every flag is available in all Source Engine branches, unless specifically mentioned in the Availability
box
Name | Seen in .vmt | Availability | Effect |
---|---|---|---|
%CompileBlockLOS | toolsblocklos | Makes the brush block only the line of sight for NPCs. Note:Also works for bots in .
| |
%CompileDetail | Forces the brush to no longer cut visleafs, similar to func_detail .
| ||
%CompileHint | toolshint | Makes the face hint-cut visleafs. This implies NoLight and NoDraw. | |
%CompileInvisible | toolsinvisible | Makes a surface behave like NoDraw, but still allows bullets to pass through it, except in Counter-Strike: Global Offensive. This also implies NoLight. | |
%CompileLadder | toolsladder | Makes the brush usable as a func_ladder .Can be applied to any material, such as metal/metalladder.vmt for a cheap ladder without a prop. Else also add %compilenodraw to make it invisible.
| |
%CompileNoDraw | toolsnodraw | Makes a brush behave like tools/toolsnodraw .
| |
%CompileNonSolid | Makes the brush not solid to anything. | ||
%CompileNoShadows | (only in )(also in ) | Prevents shadows from being cast onto the texture. | |
%CompilePassBullets | Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates. Bug:Non-functional in Counter-Strike: Global Offensive and Counter-Strike: Source. | ||
%CompileTeam | climb_versus | (only in ) | Decides which team should be affected by this tool texture. |
%CompileWater | Marks the brush as a water-type material. Makes it non-solid, allows swimming inside, etc. If %CompileKeepLight is also set, the brush will retain its lighting data.
| ||
%CompileSlime | same as %CompileWater, but with green splash particles. | ||
%NoPortal | toolsblack_noportal | (only in ) | Makes the texture non-portalable unless Conversion Gel is used. |
%NoPaint | (in all games since ) | Makes the material unable to be painted by Gel.
Implies $nodecal, as they share a surface flag. | |
%CompileStairs | toolsstairs | (only in ) | Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°. |
$NoDecal | Makes the material not receive decals.
Important:This is a map compile flag when used on brushes and displacements, but not when used on models, hence why it starts with $ instead of %.
|