Material map compile flags: Difference between revisions
Kestrelguy (talk | contribs) m (→%NoPortal {{only|{{portal}}{{portal2}}}}: used the "portals" template instead of separate templates for the funni text color) |
Kestrelguy (talk | contribs) m (added language bar. also some formatting.) |
||
Line 1: | Line 1: | ||
Several special shader parameters exist | {{lang|{{PAGENAME}}}} | ||
Several special shader parameters exist that start with a <code>%</code> sign instead of <tt>$</tt>. 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 <code>tools/</code> textures, but they may also be used for other materials. All are boolean properties. These cannot be affected by [[Material Proxies|Proxies]]. | |||
See also [[ | See also [[Tool textures|Tool Textures]] for more detail about the propeties of individual materials. | ||
Example: | Example: | ||
Line 9: | Line 10: | ||
'''%compileclip 1''' | '''%compileclip 1''' | ||
} | } | ||
== Exclusive Flags == | == Exclusive Flags == | ||
'''Only one''' of the following flags may be set on any given material. | '''Only one''' of the following flags may be set on any given material. | ||
=== %CompileClip (< | === %CompileClip (<tt>toolsclip</tt>) === | ||
[[image:Toolsclip.gif|32px]] Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of | [[image:Toolsclip.gif|32px]] Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of <tt>PlayerClip</tt> and <tt>NPCClip</tt>. | ||
=== %CompileNoChop === | === %CompileNoChop === | ||
Prevents | Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles. | ||
=== %CompileNPCClip (< | === %CompileNPCClip (<tt>toolsnpcclip</tt>) === | ||
[[image:Toolsnpcclip.gif|32px]] Makes the brush block only [[NPC]]s. This implies | [[image:Toolsnpcclip.gif|32px]] Makes the brush block only [[NPC]]s. This implies <tt>NoLight</tt> and </tt>NoDraw</tt>. | ||
{{Note | {{csgo}} Blocks [[bot]]s, even though they are [[player]]s.}} | {{Note|{{csgo}} Blocks [[bot]]s, even though they are [[player]]s.}} | ||
=== %CompileOrigin (< | === %CompileOrigin (<tt>toolsorigin</tt>) {{obs}} === | ||
[[image:Toolsorigin.gif|32px]] Sets the origin of a brush entity. This is deprecated | [[image:Toolsorigin.gif|32px]] Sets the origin of a brush entity. This is deprecated in {{Source|2}} and {{source2|2}}. In {{gldsrc|2}}, origin brushes were used to set the rotation origin of rotating entities. | ||
=== %CompileTrigger (< | === %CompileTrigger (<tt>toolstrigger</tt>) === | ||
[[image:Toolstrigger.gif|32px]] Makes the brush suitable for [[Trigger]]s. | [[image:Toolstrigger.gif|32px]] Makes the brush suitable for [[Trigger]]s. | ||
=== %CompileSkip(toolsskip) === | === %CompileSkip(<tt>toolsskip</tt>) === | ||
[[image:Toolsskip.gif|32px]] Removes the face during compilation, making the brush into sets of planes. | [[image:Toolsskip.gif|32px]] Removes the face during compilation, making the brush into sets of planes. | ||
=== %CompileSky (toolsskybox) === | === %CompileSky (<tt>toolsskybox</tt>) === | ||
[[image:Toolsskybox.gif|32px]] Makes the face render the (2D/3D) [[Skybox]] and emit | [[image:Toolsskybox.gif|32px]] Makes the face render the (2D/3D) [[Skybox]] and emit {{ent|light_environment}} light. | ||
=== %Compile2DSky (toolsskybox2d) === | === %Compile2DSky (<tt>toolsskybox2d</tt>) === | ||
[[image:Toolsskybox2d.gif|32px]] Makes the face render the 2D [[Skybox]] only, in addition to emitting | [[image:Toolsskybox2d.gif|32px]] Makes the face render the 2D [[Skybox]] only, in addition to emitting <tt>light_environment</tt> light. | ||
=== %PlayerClip (< | === %PlayerClip (<tt>toolsplayerclip</tt>) === | ||
[[image:Toolsplayerclip.gif|32px]] Makes the brush only block [[player]]s. | [[image:Toolsplayerclip.gif|32px]] Makes the brush only block [[player]]s. | ||
=== %CompileNoLight (< | === %CompileNoLight (<tt>nolight</tt>) === | ||
[[image:Toolsblack.gif|32px]]{{as|since}}{{src13|also}}<br> | |||
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 | 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 {{as|2}}, using it for the black areas you see in the levels. | ||
== Additive Flags == | == Additive Flags == | ||
Multiple of the following flags may be applied to any given material. | Multiple of the following flags may be applied to any given material. | ||
=== %CompileBlockLOS (< | === %CompileBlockLOS (<tt>toolsblocklos</tt>) === | ||
[[image:Toolsblocklos.gif|32px]] Makes the brush block only the [[line of sight]] for [[NPC]]s. | [[image:Toolsblocklos.gif|32px]] Makes the brush block only the [[line of sight]] for [[NPC]]s. | ||
{{Note | Also works for [[bot]]s in {{csgo}}.}} | {{Note|Also works for [[bot]]s in {{csgo}}.}} | ||
=== %CompileDetail === | === %CompileDetail === | ||
Forces the brush to no longer cut [[visleaf]]s, similar to | Forces the brush to no longer cut [[visleaf]]s, similar to {{ent|func_detail}}. | ||
=== %CompileHint (< | === %CompileHint (<tt>toolshint</tt>)=== | ||
[[image:Toolshint.gif|32px]] Makes the face hint-cut [[visleaf]]s. This implies | [[image:Toolshint.gif|32px]] Makes the face hint-cut [[visleaf]]s. This implies <tt>NoLight</tt> and <tt>NoDraw</tt>. | ||
=== %CompileInvisible (< | === %CompileInvisible (<tt>toolsinvisible</tt>) === | ||
[[image:Toolsinvisible.gif|32px]] Makes a surface behave like | [[image:Toolsinvisible.gif|32px]] Makes a surface behave like <tt>NoDraw</tt>, but still allows bullets to pass through it, except in {{csgo|2}}. This also implies <tt>NoLight</tt>. | ||
=== %CompileLadder === | === %CompileLadder (<tt>toolsladder</tt>)=== | ||
[[image:Toolsladder.gif|32px]] Makes the brush usable as a | [[image:Toolsladder.gif|32px]] Makes the brush usable as a {{ent|func_ladder}}. | ||
=== %CompileNoDraw (< | === %CompileNoDraw (<tt>toolsnodraw</tt>) === | ||
[[image:Toolsnodraw.gif|32px]] Makes a brush behave like <code>tools/toolsnodraw</code>. | [[image:Toolsnodraw.gif|32px]] Makes a brush behave like <code>tools/toolsnodraw</code>. | ||
Line 76: | Line 77: | ||
=== %CompilePassBullets=== | === %CompilePassBullets=== | ||
Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates. | 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 {{csgo}} and {{css}}.}} | {{bug|Non-functional in {{csgo|2}} and {{css|2}}.}} | ||
===%CompileTeam=== | ===%CompileTeam=== | ||
{{l4d2}} Decides which team should be affected by this tool texture. Seen in climb_versus, a ladder for infected only | {{Seealso|{{ent|%compileteam}}}} | ||
{{l4d2|only}}<br>Decides which team should be affected by this tool texture. Seen in <tt>climb_versus</tt>, a ladder for infected only. | |||
=== %CompileWater, %CompileSlime === | === %CompileWater, %CompileSlime === | ||
Marks the brush as a [[ | Marks the brush as a [[Water (shader)|water]]-type material. Makes it non-solid, allows swimming inside, etc. The slime variant switches to green splash particles. If <code>%CompileKeepLight</code> is also set, the brush will retain its lighting data. | ||
{{bug|%CompileSlime uses default water splash particles | {{bug|{{l4d2}} <tt>%CompileSlime</tt> uses default water splash particles.}} | ||
=== %NoPortal {{only|{{ | ===%NoPortal=== | ||
{{only|{{Portal2series}}}}<br> | |||
Makes the texture non-portalable unless [[Gel (Portal 2)|Conversion Gel]] is used. | |||
=== %NoPaint {{only | ===%NoPaint=== | ||
{{portal2|only}}<br> | |||
Makes the material unable to be painted by [[Gel (Portal 2)|Gel]]. | |||
=== %CompileStairs {{only | === %CompileStairs === | ||
{{infra|only}}<br> | |||
Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°. | Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°. | ||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters]] |
Revision as of 10:15, 30 June 2022
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 are boolean properties. These cannot be affected by Proxies.
See also Tool Textures for more detail about the propeties of individual materials.
Example:
LightmappedGeneric { $basetexture developer/custom_clip %compileclip 1 }
Exclusive Flags
Only one of the following flags may be set on any given material.
%CompileClip (toolsclip)
Makes the brush block only players and NPCs. This is equivalent to a combination of PlayerClip and NPCClip.
%CompileNoChop
Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.
%CompileNPCClip (toolsnpcclip)
Makes the brush block only NPCs. This implies NoLight and NoDraw.
%CompileOrigin (toolsorigin) 
Sets the origin of a brush entity. This is deprecated in
Source and
Source 2. In
GoldSrc, origin brushes were used to set the rotation origin of rotating entities.
%CompileTrigger (toolstrigger)
Makes the brush suitable for Triggers.
%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.
%Compile2DSky (toolsskybox2d)
Makes the face render the 2D Skybox only, in addition to emitting light_environment light.
%PlayerClip (toolsplayerclip)
Makes the brush only block players.
%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. Valve introduced this parameter with Alien Swarm, using it for the black areas you see in the levels.
Additive Flags
Multiple of the following flags may be applied to any given material.
%CompileBlockLOS (toolsblocklos)
Makes the brush block only the line of sight for NPCs.


%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.
%CompileNoDraw (toolsnodraw)
Makes a brush behave like
tools/toolsnodraw
.
%CompileNonSolid
Makes the brush not solid to anything.


%CompileNoShadows
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.



%CompileTeam
(only in )
Decides which team should be affected by this tool texture. Seen in climb_versus, a ladder for infected only.
%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
(only in Template:Portal2series)
Makes the texture non-portalable unless Conversion Gel is used.
%NoPaint
(only in )
Makes the material unable to be painted by Gel.
%CompileStairs
(only in )
Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°.