From Valve Developer Community
Jump to: navigation, search
 English Français 

VertexLitGeneric is a material shader available in all Source games. It is the shader most commonly used to render models, and supports a variety of effects.

Supported Parameters

Normal mapping.
Color tinting.
$decaltexture (only in Counter-Strike: Global Offensive)
Use a 2nd UV channel for high-resolution decal support.
Detail texturing.
Specular reflections.
$emissiveblend (in all games since <Source><Source>)
Advanced flowing self-illumination, used on the Vortigaunts in <Half-Life 2: Episode Two><Half-Life 2: Episode Two> Half-Life 2: Episode Two.
$flesh (in all games since <Source><Source>)
The flesh effect used for Alyx in Half-Life 2: Episode Two.
Half-lambertian shading.
$lightwarptexture (in all games since <Source><Source>)
Per-texel color modification via a warp texture.
$phong (in all games since <Source><Source>)
Diffuse reflections.
$rimlight (in all games since <Source><Source>)
Constant rimlight based on phong and the ambient lighting.
Expensive and cheap transparency.
$compress (in all games since <Source><Source>)
$stretch (in all games since <Source><Source>)
Wrinklemaps for character faces.
$treeSway (in all games since Left 4 Dead)
Vertex manipulation to give the effect of trees swaying in the wind.

Misc Parameters

$flashlightnolambert <boolean> (in all games since <Source><Source>)
Tell projected textures such as the flashlight to ignore the surface normal of the model. Useful for models with $nocull such as foilage. Otherwise, lighting the face with a flashlight from behind will not affect it. Default 0.
$seperatedetailuvs <boolean> (in all games since <Source><Source>)
To do: Use texcoord1 for detail texture
$desaturatewithbasealpha <float> (in all games since <Alien Swarm>)
Use the base alpha to desaturate the base texture. Set to non-zero to enable, value gets multiplied into the alpha channel before desaturating.
$lowqualityflashlightshadows <boolean> (in all games since [Portal 2])
Force low quality flashlight/projected texture shadows for faster performance.
$allowfencerenderstatehack <boolean> (in all games since Counter-Strike: Global Offensive)
Fence render hack for cascade shadow maps, allows shadow maps to work properly with fences.
$disablecsmlookup <boolean> (in all games since Counter-Strike: Global Offensive)
Disable cascade shadow map lookup/filtering, useful on dense foilage.
$allowdiffusemodulation <boolean> (in all games since Left 4 Dead)
Prevents the model's material from being tinted by $color2 or rendercolor.
$notint <boolean> (only in Counter-Strike: Global Offensive)  (also in Portal 2: Community Edition)
Prevents the model's material from being tinted by $color2 or rendercolor.


VertexLitGeneric natively supports the Spy cloak effect from <Team Fortress 2> Team Fortress 2. You will want to combine it with a sine wave proxy for the full effect.

$cloakpassenabled <boolean>
Enables cloaking effects.
$cloakfactor <normal>
0 = fully visible, 1 = fully invisible.
$cloakcolortint <RGB matrix>
Colors the refraction effect. Default is white.
$refractamount <float>
How strong the refraction effect should be when the material is partially cloaked. Default 2.

See also