$decal: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 3: Line 3:


==VMT syntax example==
==VMT syntax example==
  "LightmappedGeneric"
  "[[LightmappedGeneric]]"
  {
  {
     "[[$basetexture]]" "decals/mydecal"
     "[[$basetexture]]" "decals/mydecal"

Revision as of 17:14, 4 April 2008

The $decal VMT command is specifies that the $basetexture will be projected onto, and clipped into, whatever surface it is applied to.

VMT syntax example

"LightmappedGeneric"
{
    "$basetexture" "decals/mydecal"
    "$decal" 1
    "$decalscale" 0.10
    "$translucent" 1
}

$decalscale

  • In this example the key "$decalscale" is set to a value of "0.1", meaning that the decal is rendered at 1/10th scale inside of the engine. If the source texture for this decal is 128 pixels, it will be 12.8 inches in size in the engine (or about a foot in length).