Subrect: Difference between revisions
Jump to navigation
Jump to search
RabidMonkey (talk | contribs) (created page for subrect decal shader) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
'''<code>Subrect</code>''' is a shader used to render decals that are a portion of a larger 'sheet' of decal textures. This is used in most Valve games for decal sheets | '''<code>Subrect</code>''' is a shader used to render decals that are a portion of a larger 'sheet' of decal textures. This is used in most Valve games for decal sheets comprising different impact types (wood, tile, concrete etc), but can also be used in Hammer for decals on world surfaces (the decal will preview incorrectly in Hammer but will appear correct in-game!) | ||
== Basic syntax == | == Basic syntax == | ||
Line 18: | Line 18: | ||
$decalscale | $decalscale | ||
$modelmaterial "decals/decal01" - replaces the material when applied to a model as opposed to the world | $modelmaterial "decals/decal01" - replaces the material when applied to a model as opposed to the world | ||
== See also == | == See also == |
Latest revision as of 13:50, 21 September 2023
Subrect
is a shader used to render decals that are a portion of a larger 'sheet' of decal textures. This is used in most Valve games for decal sheets comprising different impact types (wood, tile, concrete etc), but can also be used in Hammer for decals on world surfaces (the decal will preview incorrectly in Hammer but will appear correct in-game!)
Basic syntax
The Subrect shader uses $Material in place of $basetexture:
Subrect
{
"$Material" "decals/decals_mod2x"
"$Pos" "384 128"
"$Size" "64 64"
}
Additional Parameters
$decalscale
$modelmaterial "decals/decal01" - replaces the material when applied to a model as opposed to the world