VertexLitGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 74: Line 74:
{{MatParam|$refractamount|float|How strong the refraction effect should be when the material is partially cloaked. Default 2.}}
{{MatParam|$refractamount|float|How strong the refraction effect should be when the material is partially cloaked. Default 2.}}


=== See also ===
== See also ==
* [[Materials_for_models#Compiling_your.VMT_:_Valve_Material_Type|Materials for models]]
* [[Materials_for_models#Compiling_your.VMT_:_Valve_Material_Type|Materials for models]]
*{{ent|EyeRefract}}, the shader for modeled eyes.
*{{ent|EyeRefract}}, the shader for modeled eyes.
*{{ent|Teeth}}, the shader for modeled teeth.
*{{ent|Teeth}}, the shader for modeled teeth.

Revision as of 08:02, 16 October 2021

English (en)Français (fr)中文 (zh)Translate (Translate)

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

Basics

$basetexture
Defines an albedo texture.
$decaltexture (only in Counter-Strike: Global Offensive)
Use a 2nd UV channel for high-resolution decal support.
$detail
Detail texturing.

$seperatedetailuvs

Adjustment

[[$allowdiffusemodulation|$allowdiffusemodulation]]

$color2
Color tinting.

$desaturatewithbasealpha

$lightwarptexture (in all games since Source 2006)
Per-texel color modification via a warp texture.

[[$notint|$notint]]

$compress (in all games since Source 2007)
$stretch (in all games since Source 2007)
Wrinklemaps for character faces.

Transparency

$allowfencerenderstatehack

$alpha
Scales the opacity of an entire material.
$alphatest
Specifies a mask to use to determine binary opacity.

$disablecsmlookup

$distancealpha (in all games since Source 2007)
Vector-like edge filtering.
$nocull
Disables backface culling.
$translucent
Specifies that the material should be partially see-through.

Lighting

$bumpmap
Normal mapping.
$emissiveblend (in all games since Source 2007)
Advanced flowing self-illumination, used on the Vortigaunts in Half-Life 2: Episode Two Half-Life 2: Episode Two .

$flashlightnolambert

$halflambert
Half-lambertian shading.

$lowqualityflashlightshadows

$selfillum
Determines whether the surface is self-illuminated independent of environment lighting.

Reflection

$envmap
Specular reflections.
$phong (in all games since Source 2006)
Diffuse reflections.
$rimlight (in all games since Source 2007)
Constant rimlight based on phong and the ambient lighting.

Effect

$flesh (in all games since Source 2007)
The flesh effect used for Alyx in Half-Life 2: Episode Two.
$treeSway (in all games since Left 4 Dead)
Vertex manipulation to give the effect of trees swaying in the wind.

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 $cloakfactor $cloakcolortint $refractamount

See also