VertexLitGeneric

From Valve Developer Community
Revision as of 10:56, 27 June 2019 by Deprecated (talk | contribs) (Changed to use Shader, MatParam, and ent templates where applicable, added game add information, added misc CSGO parameters)
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 (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
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 <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
The flesh effect used for Alyx in Half-Life 2: Episode Two.
$halflambert
Half-lambertian shading.
$lightwarptexture (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Per-texel color modification via a warp texture.
$phong (in all games since <Half-Life 2: Episode One><Half-Life 2: Episode One>)
Diffuse reflections.
$rimlight (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
Constant rimlight based on phong and the ambient lighting.
$selfillum
Self-illumination.
$translucent
$alpha
Expensive and cheap transparency.
$compress (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
$stretch (in all games since <Half-Life 2: Episode Two><Half-Life 2: Episode Two>)
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

$desaturatewithbasealpha <float> (in all games since AS)
Use the base alpha to desaturate the base texture. Set to non-zero to enable, value gets multiplied into the alpha channel before desaturating.
$flashlightnolambert <boolean>
To do: Flashlight pass sets N.L=1.0
$seperatedetailuvs <boolean>
To do: Use texcoord1 for detail texture
$allowfencerenderstatehack <boolean> (in all games since CSGO)
Fence render hack for cascade shadow maps, allows shadow maps to work properly with fences.
$disablecsmlookup <boolean> (in all games since CSGO)
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