From Valve Developer Community
Jump to: navigation, search

$decaltexture is a material shader parameter available in <Counter-Strike: Global Offensive> Counter-Strike: Global Offensive for VertexLitGeneric. It allows for a second UV channel to be defined for a model, allowing a decal texture to be placed on top of the base material. To use the parameter, the MDL must have been compiled from an FBX file and have a second UV channel defined.

Bug: Using VBSP's -StaticPropCombine parameter appears to break this effect on autocombined models in some cases.
Here, each label on the crates is laid out on a separate UV channel to that of the main texture – this allows easy and efficient reuse of the same labels/decals on many different props without losing texture resolution.

Parameters and Effects

$decaltexture <texture>
The path to the decal texture.
$decalblendmode <boolean>
Controls blending of decal. 0 is alpha masked, 1 is multiplied.
Note:If set to 1, $phong will not function on the material.