Difference between revisions of "Material Map Compile Flags"

From Valve Developer Community
Jump to: navigation, search
(added csgo/css note to %PlayerClip and %CompilePassBullets)
(csgo doesnt have npcs)
Line 40: Line 40:
=== %PlayerClip (<code>tools/toolsplayerclip</code>) ===  
=== %PlayerClip (<code>tools/toolsplayerclip</code>) ===  
[[image:Toolsplayerclip.gif|32px]] Makes the brush only block players.
[[image:Toolsplayerclip.gif|32px]] Makes the brush only block players.
{{note | Also blocks NPCs in {{csgo}}.}}
=== %CompileNoLight (<code>nolight</code>) ===  
=== %CompileNoLight (<code>nolight</code>) ===  

Revision as of 21:13, 6 December 2020

Several special shader parameters exist, starting 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 may also be used for other materials. All are boolean properties. These cannot be affected by Proxies.

See also Tool Textures for more detail about the propeties of individual materials.


$basetexture developer/custom_clip
%compileclip 1

Exclusive Flags

Only one of these flags may be set on any given material.

%CompileClip (toolsclip)

Toolsclip.gif Makes the brush block only players and NPCs. This is equivalent to a combination of PlayerClip and NPCClip.


Prevents 'subdividing patches' on the surface. This presumably affects how the face is converted to triangles.

%CompileNPCClip (toolsnpcclip)

Toolsnpcclip.gif Makes the brush block only NPCs. This implies NoLight and NoDraw.

%CompileOrigin (toolsorigin)

Toolsorigin.gif Sets the origin of a brush entity. This is deprecated for Source maps, in GoldSource origin brushes were used to set the rotation origin of rotating entities.

%CompileTrigger (toolstrigger)

Toolstrigger.gif Makes the brush suitable for Triggers.


Toolsskip.gif Removes the face during compilation, making the brush into sets of planes.

%CompileSky (toolsskybox)

Toolsskybox.gif Makes the face render the (2D/3D) Skybox, and emit light_environment light.

%Compile2DSky (toolsskybox2d)

Toolsskybox2d.gif Makes the face render the 2D Skybox only, in addition to emitting light_environment light.

%PlayerClip (tools/toolsplayerclip)

Toolsplayerclip.gif Makes the brush only block players.

%CompileNoLight (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. Valve introduced this parameter with Alien Swarm, using it for the black areas you see in the levels.

Additive Flags

Multiple of these flags may be applied to any given material.

%CompileBlockLOS (toolsblocklos)

Toolsblocklos.gif Makes the brush block NPC line of sight only.


=Forces the brush to no longer cut visleafs, similar to func_detail.


Toolshint.gif Makes the face hint-cut visleafs. This implies NoLight and NoDraw.

%CompileInvisible (toolsinvisible)

Toolsinvisible.gif Makes a surface behave like NoDraw, but still allow bullets to pass through it. This implies NoLight also.


Toolsladder.gif Makes the brush usable as a func_ladder.

%CompileNoDraw (toolsnodraw)

Toolsnodraw.gif Makes a brush behave like tools/toolsnodraw.


Makes the brush not solid to anything.


Prevents shadows from being cast onto the texture.


Makes the brush act as a "grating" type, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates.

Bug.png Bug:  Non-functional in Counter-Strike: Global Offensive and Counter-Strike: Source.

%CompileWater, CompileSlime

Marks the brush as a water-type material. Makes it non-solid, allows swimming inside, etc. The slime variant switches to green splash particles. If %CompileKeepLight is also set, the brush will retain its lighting data.

%NoPortal Portal Portal 2

In Portal and Portal 2, makes the texture non-portalable, unless Conversion Gel is used.

%NoPaint Portal 2

In Portal 2, makes the material unable to be painted by Gel.