VertexLitGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Rewrote $flashlightnolambert's description, added that $flashlightnolambert and $seperatedetailuvs were introduced in EP2, reorganized misc parameters)
m (Revamped with MatParam changes)
Line 4: Line 4:


;{{ent|$bumpmap}}
;{{ent|$bumpmap}}
: Bumpmapping.
: Normal mapping.
;<code>[[$color#Models|$color2]]</code>
;<code>[[$color#Models|$color2]]</code>
: Color tinting.
: Color tinting.
Line 11: Line 11:
;{{ent|$envmap}}
;{{ent|$envmap}}
: Specular reflections.
: Specular reflections.
;{{ent|$emissiveblend}} {{EP2 add}}
;{{ent|$emissiveblend}} {{since|{{src07}}}}
: 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}} {{since|{{src07}}}}
: The flesh effect used for Alyx in Half-Life 2: Episode Two.
: The flesh effect used for Alyx in Half-Life 2: Episode Two.
;{{ent|$halflambert}}
;{{ent|$halflambert}}
: Half-lambertian shading.
: Half-lambertian shading.
;{{ent|$lightwarptexture}} {{EP1 add}}
;{{ent|$lightwarptexture}} {{since|{{src06}}}}
: Per-texel color modification via a warp texture.
: Per-texel color modification via a warp texture.
;{{ent|$phong}} {{EP1 add}}
;{{ent|$phong}} {{since|{{src06}}}}
: Diffuse reflections.
: Diffuse reflections.
;{{ent|$rimlight}} {{EP2 add}}
;{{ent|$rimlight}} {{since|{{src07}}}}
: Constant rimlight based on phong and the ambient lighting.
: Constant rimlight based on phong and the ambient lighting.
;{{ent|$selfillum}}
;{{ent|$selfillum}}
Line 28: Line 28:
;{{ent|$alpha}}
;{{ent|$alpha}}
: Expensive and cheap transparency.
: Expensive and cheap transparency.
;<code>[[Wrinkle_maps#Materials_and_textures|$compress]]</code> {{EP2 add}}
;<code>[[Wrinkle_maps#Materials_and_textures|$compress]]</code> {{since|{{src07}}}}
;<code>[[Wrinkle_maps#Materials_and_textures|$stretch]]</code> {{EP2 add}}
;<code>[[Wrinkle_maps#Materials_and_textures|$stretch]]</code> {{since|{{src07}}}}
: Wrinklemaps for character faces.
: Wrinklemaps for character faces.
;{{ent|$treeSway}} {{L4D add}}
;{{ent|$treeSway}} {{since|{{l4d}}}}
: Vertex manipulation to give the effect of trees swaying in the wind.
: Vertex manipulation to give the effect of trees swaying in the wind.


===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|$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={{src07}}}}
{{MatParam|$seperatedetailuvs|bool|{{todo|''Use texcoord1 for detail texture''}}|since=EP2}}
{{MatParam|$seperatedetailuvs|bool|{{todo|''Use texcoord1 for detail texture''}}|since={{src07}}}}
{{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|$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}}}}


=== Cloak ===
=== Cloak ===

Revision as of 20:14, 22 April 2020

Shader-ball.png VertexLitGeneric It is the shader most commonly used to render models, and supports a variety of effects.

Supported Parameters

$bumpmap
Normal mapping.
$color2
Color tinting.
$detail
Detail texturing.
$envmap
Specular reflections.
$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 .
$flesh (in all games since Source 2007)
The flesh effect used for Alyx in Half-Life 2: Episode Two.
$halflambert
Half-lambertian shading.
$lightwarptexture (in all games since Source 2006)
Per-texel color modification via a warp texture.
$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.
$selfillum
Self-illumination.
$translucent
$alpha
Expensive and cheap transparency.
$compress (in all games since Source 2007)
$stretch (in all games since Source 2007)
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 $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