VertexLitGeneric

From Valve Developer Community
Jump to: navigation, search

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

$bumpmap
Bumpmapping.
$color2
Color tinting.
$detail
Detail texturing.
$envmap
Specular reflections.
$emissiveblend (New with Half-Life 2: Episode Two / Source 2007)
Advanced flowing self-illumination, used on the Vortigaunts in <Half-Life 2> Half-Life 2: Episode Two.
$flesh (New with Half-Life 2: Episode Two / Source 2007)
The flesh effect used for Alyx in Half-Life 2: Episode Two.
$halflambert
Half-lambertian shading.
$lightwarptexture (New with Half-Life 2: Episode One / Source 2006)
Per-texel color modification via a warp texture.
$phong (New with Half-Life 2: Episode One / Source 2006)
Diffuse reflections.
$rimlight (New with Half-Life 2: Episode Two / Source 2007)
Constant rimlight based on phong and the ambient lighting.
$selfillum
Self-illumination.
$translucent
$alpha
Expensive and cheap transparency.
$compress (New with Half-Life 2: Episode Two / Source 2007)
$stretch (New with Half-Life 2: Episode Two / Source 2007)
Wrinklemaps for character faces.
$treeSway (New with Left 4 Dead)
Vertex manipulation to give the effect of trees swaying in the wind.

Misc Parameters

$flashlightnolambert <boolean> (New with Half-Life 2: Episode Two / Source 2007)
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> (New with Half-Life 2: Episode Two / Source 2007)
To do: Use texcoord1 for detail texture
$desaturatewithbasealpha <float> (New with 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.
$allowfencerenderstatehack <boolean> (New with Counter-Strike: Global Offensive)
Fence render hack for cascade shadow maps, allows shadow maps to work properly with fences.
$disablecsmlookup <boolean> (New with Counter-Strike: Global Offensive)
Disable cascade shadow map lookup/filtering, useful on dense foilage.

Cloak

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