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, except for %CompileTeam.
See also Tool Textures for more detail about the propeties of individual materials.
== 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====
VMT flag 	BSP flags assigned 	Seen in VMT(s) 	Availability	Description
%CompileClip 	CONTENTS_PLAYERCLIPCONTENTS_MONSTERCLIPSURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT	toolsclip 	 	Makes the brush block only players and NPCs. This is equivalent to a combination of %PlayerClip and %CompileNPCClip.
%CompileNPCClip 	CONTENTS_MONSTERCLIPSURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolsnpcclip 	 	Makes the brush block only NPCs. This implies NoLight and </tt>NoDraw</tt>.
%PlayerClip 	CONTENTS_PLAYERCLIPSURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolsplayerclip 	 	Makes the brush only block players.
%CompilePlayerControlClip	CONTENTS_DETAILCONTENTS_MISTSURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolscontrolclip	 	Unsure as to how this was meant to be used. Usually seen together with .Material also uses $surfaceprop player_control_clip.
%CompileGrenadeClip 	CONTENTS_DETAILCONTENTS_GRENADECLIPSURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolsgrenadeclip	 	Makes the brush only block grenades.
%CompileDroneClip 	 	toolsdroneclip 	 	Makes the brush only block drones.
====Other====
VMT flag 	BSP flags assigned 	Seen in VMT(s)	Availability	Description
%Compile2DSky 	SURF_SKYSURF_SKY2DSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolsskybox2d 	 	Makes the face render the 2D Skybox only, in addition to emitting light_environment light.
%CompileFog 	none 	ToolsFog 	 	This may be a deprecated flag that so far has not been seen as being useful.
%CompileHint 	SURF_NODRAWSURF_NOLIGHTSURF_HINTremoves SURF_BUMPLIGHT 	toolshint 	 	Makes the face hint-cut visleafs. This implies NoLight and NoDraw.
%CompileNoChop 	SURF_NOCHOP 	 	 	Prevents subdividing patches on the surface for lightmapping ("chopping"). Also affects how the face is converted to triangles. A brush face using a material with this parameter will be limited to 31x31 luxels.
%CompileNoLight 	SURF_NOLIGHTremoves SURF_BUMPLIGHT 	nolight 	 	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. Not necessary for UnlitGeneric materials.
%CompileNoShadows	SURF_NOSHADOWS 	 	 	Prevents dynamic shadows from being cast onto the surface.
%CompileOrigin 	CONTENTS_ORIGINCONTENTS_DETAILSURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT	toolsorigin 	 	Sets the origin of a brush entity ( KV), for purposes such as rotation.Leftover from in . Still functional, but is no longer necessary, as the KV is acknowledged by VBSP and can be visualized directly in .
%CompileSkip 	SURF_NODRAWSURF_NOLIGHTSURF_SKIPremoves SURF_BUMPLIGHT 	toolsskip 	 	Removes the face during compilation, making the brush into sets of planes.
%CompileSky 	SURF_SKYSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolsskybox 	 	Makes the face render the (2D/3D) Skybox and emit light.
%CompileTrigger 	SURF_NOLIGHTSURF_TRIGGERremoves SURF_BUMPLIGHT 	toolstrigger 	 	Makes the brush suitable for Triggers. Implies . If is used, also assigns SURF_NODRAW.
== Additive Flags ==
Multiple of the following flags may be applied to any given material, unless it has one of the exclusive flags above.
Every flag is available in all Source Engine branches, unless specifically mentioned in the Availability box
VMT flag 	BSP flags assigned 	Seen in VMT(s) 	Availability	Description
%CompileBlockLOS 	CONTENTS_BLOCKLOS 	toolsblocklos 	 	Makes the brush block only the line of sight for NPCs.
%CompileDetail 	CONTENTS_DETAIL 	 	 	Forces the brush to no longer cut visleafs, similar to .
%CompileInvisible 	CONTENTS_GRATESURF_NODRAWSURF_NOLIGHTremoves CONTENTS_SOLIDremoves SURF_BUMPLIGHT 	toolsinvisible 	 	Shortcut for + .
%CompileKeepLight 	none 	 	 	Tells the compiler to not set SURF_NOLIGHT when using VBSP parameter if is used, unless the shader is set to Water(if before ) or UnlitGeneric.
%CompileLadder 	CONTENTS_LADDER 	toolsladder 	 	Makes the brush usable as a ladder, without needing to be tied to .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 	SURF_NODRAWSURF_NOLIGHTremoves SURF_BUMPLIGHT 	toolsnodraw 	 	Makes a brush behave like tools/toolsnodraw.
%CompileNonSolid 	CONTENTS_OPAQUE 	 	 	Makes the brush not solid to anything. All faces of the brush must have %CompileNonSolid for the brush to be nonsolid.
%CompilePassBullets	CONTENTS_GRATEremoves CONTENTS_SOLID 	 	 	Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates.
%CompileTeam 	CONTENTS_TEAM1orCONTENTS_TEAM2 	climb_versus 	 	Decides which team should be affected by this tool texture. Unlike other compile parameters, this isn't a Boolean, but instead is an integer which is either 1 or 2.
%CompileWater 	CONTENTS_WATERSURF_WARPSURF_NOSHADOWSSURF_NODECALSremoves CONTENTS_SOLIDremoves CONTENTS_DETAIL	 	 	Marks the brush as a water-type material. Makes it non-solid, allows swimming inside, etc.
%CompileWet 	SURF_WET 	 	 	
%CompileSlime 	CONTENTS_SLIMESURF_NODECALSremoves CONTENTS_SOLIDremoves CONTENTS_DETAIL 	 	 	same as %CompileWater, but with green splash particles.
%HotSurface 	SURF_NOPORTAL 	 	 	
%NoPortal 	SURF_NOPORTAL 	toolsblack_noportal	 	Makes the texture non-portalable unless Conversion Gel is used.
%NoPaint 	SURF_NODECAL(aliased to SURF_NOPAINT) 	 	 	Makes the material unable to be painted by Gel. Implies .
%CompileStairs 	 	toolsstairs 	 	Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°.
Category:Shader parameters