VertexLitGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Fixed redlink for $compress and added $stretch, $treesway, $lightwarptexture, $rimlight, $color2)
(Rewrite to provide details for parameters, added misc parameters, remove stub category)
Line 1: Line 1:
'''<code>VertexLitGeneric</code>''' is the shader most commonly used to render [[model]]s.
'''<code>VertexLitGeneric</code>''' is a [[material]] [[shader]] most commonly used to render [[model]]s.


== Supported effects ==
== Supported Parameters ==


*<code>[[$bumpmap]]</code>
;<code>[[$bumpmap]]</code>
*<code>[[$detail]]</code>
: Bumpmapping.
*<code>[[$envmap]]</code>
;<code>[[$color#Models|$color2]]</code>
*<code>[[$flesh]]</code>
: Color tinting.
*<code>[[$color#Models|$color2]]</code>
;<code>[[$detail]]</code>
*<code>[[$halflambert]]</code>
: Detail texturing.
*<code>[[$phong]]</code>
;<code>[[$envmap]]</code>
*<code>[[$rimlight]]</code>
: Specular reflections.
*<code>[[$lightwarptexture]]</code>
;<code>[[$emissiveblend]]</code>
*<code>[[$translucent]]</code> and <code>[[$alpha]]</code>
: Advanced flowing self-illumination, used on the Vortigaunts in Episode 2.
*<code>[[$emissiveblend]]</code> (the 'Vortessence' effect?)
;<code>[[$flesh]]</code>
*<code>[[Wrinkle_maps#Materials_and_textures|$compress]]</code>
: The flesh effect used for Alyx in Episode 2.
*<code>[[Wrinkle_maps#Materials_and_textures|$stretch]]</code>
;<code>[[$halflambert]]</code>
*<code>[[$treeSway]]</code>
: Half-lambertian shading.
;<code>[[$lightwarptexture]]</code>
: Per-texel color modification via a warp texture.
;<code>[[$phong]]</code>
: Diffuse reflections.
;<code>[[$rimlight]]</code>
: Constant rimlight based on phong and the ambient lighting.
;<code>[[$selfillum]]</code>
: Self-illumination.
;<code>[[$translucent]]</code>
;<code>[[$alpha]]</code>
: Expensive and cheap transparency.
;<code>[[Wrinkle_maps#Materials_and_textures|$compress]]</code>
;<code>[[Wrinkle_maps#Materials_and_textures|$stretch]]</code>
: Wrinklemaps for character faces.
;<code>[[$treeSway]]</code>
: Vertex manipulation to give the effect of trees swaying in the wind.
 
===Misc Parameters===
 
;<code>$desaturatewithbasealpha <[[float]]></code> {{AS add}}
: Use the base alpha to desaturate the base texture.  Set to non-zero to enable, value gets multiplied into the alpha channel before desaturating.
;<code>$flashlightnolambert <[[bool]]></code>
: {{todo|''Flashlight pass sets N.L{{=}}1.0''}}
;<code>$seperatedetailuvs <bool></code>
: {{todo|''Use texcoord1 for detail texture''}}


=== Cloak ===
=== Cloak ===
Line 31: Line 56:
: How strong the refraction effect should be when the material is partially cloaked (default = 2).
: 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]]
*<code>[[Eyes]]</code>
*<code>[[EyeRefract]]</code>, the shader for modeled eyes.
*<code>[[Teeth]]</code>
*<code>[[Teeth]]</code>, the shader for modeled teeth.


[[Category:Shaders]]
[[Category:Shaders]]
[[Category:Stubs]]

Revision as of 18:25, 12 May 2019

VertexLitGeneric is a material shader most commonly used to render models.

Supported Parameters

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

Misc Parameters

$desaturatewithbasealpha <float> Template:AS add
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 <bool>
Todo: Flashlight pass sets N.L=1.0
$seperatedetailuvs <bool>
Todo: Use texcoord1 for detail texture

Cloak

VertexLitGeneric natively supports the Spy cloak effect from Team Fortress 2. You will want to combine it with a sine wave proxy for the full effect.

$cloakpassenabled <bool>
Enables cloaking effects.
$cloakfactor <normal>
0 = fully visible, 1 = fully invisible.
$cloakcolortint <RGB matrix>
Colours 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