$blendtintbybasealpha
$blendtintbybasealpha  is a   material shader parameter for the VertexLitGeneric shader available in all  Source games since
 Source games since  Left 4 Dead. It is also available in
 Left 4 Dead. It is also available in  Source 2013.
 Source 2013.
It allows tinting of a model's material using the $basetexture's alpha channel as a mask to determine tint intensity (but not the tint's  RGB color!) Applying an actual color RGB values is done elsewhere - either in-game, in Hammer with entities using the 'rendercolor' keyvalue, or using $color2 in the VMT. This technique is used in games like Left 4 Dead to allow for recoloring of the vehicle props, and in Team Fortress 2 for painting hats.
 Bug:Not compatible with a number of shader parameters:
Bug:Not compatible with a number of shader parameters:
- $alphatest or $translucent - overrides both, disabling translucency. Use the Modulate shader as a workaround.
- $basealphaenvmapmask, in  Source 2013 and in Source 2013 and in Team Fortress 2, fails to load the shader combo. Use a separate $envmapmask. Team Fortress 2, fails to load the shader combo. Use a separate $envmapmask.
- $selfillum, fails to load the shader combo. Using a separate selfillum mask has no effect. Use $detail with $detailblendmode 5as a workaround.
- $detail, detail texture will render and disable the tint masking. Occurs in  . Todo: Test other games.[todo tested in ?] . Todo: Test other games.[todo tested in ?]
 Note:Only compatible with VertexLitGeneric.
Note:Only compatible with VertexLitGeneric.Usage
The tint mask simply controls the intensity of tinting. The more alpha, the more intense tinting is.
In practice, it is a good idea to use the mask to avoid tinting parts of the model that aren't covered by paint: either elements like lights, license plates, wheels, warning stripes, or scratched off, rusted or dirty areas, where the paint lost its effect.
Alternatively, this method can be used to only paint selected elements, like labels, colored glass, parts of clothing, character hair, makeup and so on.
- Using - rendercoloron prop physics or prop dynamic entities without- $blendtintbybasealpha. The tint is applied across the entire texture, which in this case is undesireable.
$blendtintcoloroverbase
(only in  ) $blendtintcoloroverbase, a related parameter, controls the amount of color replacement versus tinting. (replacing the color per pixel entirely, versus adding more color to make the colors closer to the tint RGB color.) A value of '0' will be full tint while a value of '1.00' will replace the albedo in the mask area with the color defined with $color2.
) $blendtintcoloroverbase, a related parameter, controls the amount of color replacement versus tinting. (replacing the color per pixel entirely, versus adding more color to make the colors closer to the tint RGB color.) A value of '0' will be full tint while a value of '1.00' will replace the albedo in the mask area with the color defined with $color2.





