VertexLitGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(described $flashlightnolambert)
(Rewrote $flashlightnolambert's description, added that $flashlightnolambert and $seperatedetailuvs were introduced in EP2, reorganized misc parameters)
Line 12: Line 12:
: Specular reflections.
: Specular reflections.
;{{ent|$emissiveblend}} {{EP2 add}}
;{{ent|$emissiveblend}} {{EP2 add}}
: Advanced flowing self-illumination, used on the Vortigaunts in {{Game link|Half-Life 2: Episode Two}}
: Advanced flowing self-illumination, used on the Vortigaunts in {{Game link|Half-Life 2: Episode Two}}.
;{{ent|$flesh}} {{EP2 add}}
;{{ent|$flesh}} {{EP2 add}}
: The flesh effect used for Alyx in Half-Life 2: Episode Two.
: The flesh effect used for Alyx in Half-Life 2: Episode Two.
Line 36: Line 36:
===Misc Parameters===
===Misc Parameters===


{{MatParam|$flashlightnolambert|bool|Tell [[env_projectedtexture|projected textures]] such as the flashlight to ignore the surface normal of the model. Useful for models with {{ent|$nocull}} such as foilage. Otherwise, lighting the face with a flashlight from behind will not affect it. Default 0.|since=EP2}}
{{MatParam|$seperatedetailuvs|bool|{{todo|''Use texcoord1 for detail texture''}}|since=EP2}}
{{MatParam|$desaturatewithbasealpha|float|Use the base alpha to desaturate the base texture. Set to non-zero to enable, value gets multiplied into the alpha channel before desaturating.|since=AS}}
{{MatParam|$desaturatewithbasealpha|float|Use the base alpha to desaturate the base texture. Set to non-zero to enable, value gets multiplied into the alpha channel before desaturating.|since=AS}}
{{MatParam|$flashlightnolambert|bool|Ignore surface normal for flashlight. Useful for models with [[$nocull]] such as foliage. Otherwise lighting the face with a flashlight from behind will not affect it. It's 0 by default.}}
{{MatParam|$seperatedetailuvs|bool|{{todo|''Use texcoord1 for detail texture''}}}}
{{MatParam|$allowfencerenderstatehack|bool|Fence render hack for cascade shadow maps, allows shadow maps to work properly with fences.|since=CSGO}}
{{MatParam|$allowfencerenderstatehack|bool|Fence render hack for cascade shadow maps, allows shadow maps to work properly with fences.|since=CSGO}}
{{MatParam|$disablecsmlookup|bool|Disable cascade shadow map lookup/filtering, useful on dense foilage.|since=CSGO}}
{{MatParam|$disablecsmlookup|bool|Disable cascade shadow map lookup/filtering, useful on dense foilage.|since=CSGO}}

Revision as of 15:27, 30 November 2019

Shader-ball.png VertexLitGeneric 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 Template:EP2 add
Advanced flowing self-illumination, used on the Vortigaunts in Half-Life 2: Episode Two Half-Life 2: Episode Two .
$flesh Template:EP2 add
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)
Per-texel color modification via a warp texture.
$phong (in all games since Half-Life 2: Episode One)
Diffuse reflections.
$rimlight Template:EP2 add
Constant rimlight based on phong and the ambient lighting.
$selfillum
Self-illumination.
$translucent
$alpha
Expensive and cheap transparency.
$compress Template:EP2 add
$stretch Template:EP2 add
Wrinklemaps for character faces.
$treeSway Template:L4D add
Vertex manipulation to give the effect of trees swaying in the wind.

Misc Parameters

$flashlightnolambert $seperatedetailuvs $desaturatewithbasealpha $allowfencerenderstatehack $disablecsmlookup

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