VertexLitGeneric: Difference between revisions
Jump to navigation
Jump to search
Deprecated (talk | contribs) (Re-ordered parameters based on engine addition dates) |
Peterscraps (talk | contribs) mNo edit summary |
||
Line 72: | Line 72: | ||
{{MatParam|$cloakpassenabled|bool|Enables cloaking effects.}} | {{MatParam|$cloakpassenabled|bool|Enables cloaking effects.}} | ||
{{MatParam|$cloakfactor|normal|0 {{=}} fully visible, 1 {{=}} fully invisible.}} | {{MatParam|$cloakfactor|normal|0.00 {{=}} fully visible, 1.00 {{=}} fully invisible.}} | ||
{{MatParam|$cloakcolortint|RGB matrix|Colors the refraction effect. Default is white.}} | {{MatParam|$cloakcolortint|RGB matrix|Colors the refraction effect. Default is white.}} | ||
{{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.}} |
Revision as of 14:57, 3 February 2023
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.
- $detail
- Detail texturing.
- $decaltexture (only in
)
- Use a 2nd UV channel for high-resolution decal support.
Adjustment
$color2
- Color tinting.
- $lightwarptexture (in all games since
)
- Per-texel color modification via a warp texture.
[[$allowdiffusemodulation|$allowdiffusemodulation]]
$desaturatewithbasealpha
[[$notint|$notint]]
Transparency
- $alpha
- Cheaply scales the opacity of an entire material.
- $alphatest
- Cheap transparency using a binary opacity mask.
- $nocull
- Disables backface culling.
- $translucent
- Expensive translucency using a full alpha mask.
- $distancealpha (in all games since
)
- Vector-like edge filtering.
Lighting
- $bumpmap
- Normal mapping.
- $halflambert
- Half-lambertian shading.
- $selfillum
- Determines whether the surface is self-illuminated independent of environment lighting.
- $emissiveblend (in all games since
)
- Advanced flowing self-illumination, used on the Vortigaunts in
Half-Life 2: Episode Two .
Reflection
- $envmap
- Specular reflections.
- $phong (in all games since
)
- Diffuse reflections.
- $rimlight (in all games since
)
- Constant rimlight based on phong and the ambient lighting.
Effect
$compress
(in all games since)
$stretch
(in all games since)
- Wrinklemaps for character faces.
- $flesh (in all games since
)
- The flesh effect used for Alyx in Half-Life 2: Episode Two.
- $treeSway (in all games since
)
- Vertex manipulation to give the effect of trees swaying in the wind.
Technical Workarounds
$flashlightnolambert
$lowqualityflashlightshadows
$allowfencerenderstatehack
$disablecsmlookup
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
$cloakfactor
$cloakcolortint
$refractamount
Caveats
Mapbase
Unlit materials in Mapbase should have the shader SDK_VertexLitGeneric
.
See also
- Materials for models
- EyeRefract, the shader for modeled eyes.
- Teeth, the shader for modeled teeth.