Subrect: Difference between revisions
Jump to navigation
Jump to search
RabidMonkey (talk | contribs) (created page for subrect decal shader) |
m (this is indeed how it works) |
||
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 == |
Revision as of 19:30, 1 July 2020
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 comprised of 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