VertexLitGeneric: Difference between revisions
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
(This was the culprit of a significant performance loss on a TF2 map) |
||
Line 57: | Line 57: | ||
<code>VertexLitGeneric</code> natively supports the Spy cloak effect from {{Game link|Team Fortress 2}}. Combine it with a sine wave [[Material Proxies|proxy]] for the full effect. | <code>VertexLitGeneric</code> natively supports the Spy cloak effect from {{Game link|Team Fortress 2}}. Combine it with a sine wave [[Material Proxies|proxy]] for the full effect. | ||
{{MatParam|$cloakpassenabled|bool|Enables cloaking effects.}} | {{MatParam|$cloakpassenabled|bool|Enables cloaking effects. {{warning|Enabling this on static props causes a heavy performance penalty, even if the cloak effect itself isn't being used!}}}} | ||
{{MatParam|$cloakfactor|normal|0.00 {{=}} fully visible,<br/> | {{MatParam|$cloakfactor|normal|0.00 {{=}} fully visible,<br/> | ||
1.00 {{=}} fully invisible.}} | 1.00 {{=}} fully invisible.}} |
Revision as of 16:38, 2 September 2024
VertexLitGeneric
is a Vertex shader available in all Source games. It is the shader most commonly used to render models, and supports a variety of effects. Do not use this on world geometry, else you may encounter lighting bugs.
Supported Parameters
Basics
$basetexture
$detail
$decaltexture
Adjustment
$color2
$basetexturetransform
$allowdiffusemodulation
$seperatedetailuvs
$desaturatewithbasealpha
$notint
Transparency
VertexLitGeneric support a few different methods for transparency, each for different purposes
$alpha
$alphatest
$nocull
$translucent
$additive
$distancealpha
Lighting
$bumpmap
$lightwarptexture
$halflambert
$selfillum
$emissiveblendenabled
$lightmap
Reflection
Effect
$compress
$stretch
$flesh
$treeSway
Technical Workarounds
$flashlightnolambert
$lowqualityflashlightshadows
$allowfencerenderstatehack
$disablecsmlookup
$noshadowpass
$nodeferredlight
$modelglobalnormal
Cloak
VertexLitGeneric
natively supports the Spy cloak effect from Team Fortress 2 . Combine it with a sine wave proxy for the full effect.
$cloakpassenabled
$cloakfactor
$cloakcolortint
$refractamount
Caveats
Mapbase
VertexLitGeneric 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.