VertexLitGeneric: Difference between revisions
(Improves VertexLitGeneric's material parameters readability) |
m (→Transparency: syntax) |
||
Line 18: | Line 18: | ||
=== Transparency === | === Transparency === | ||
{{MatParam|$alpha|bool|Cheaply scales the opacity of an entire material.}} | '''VertexLitGeneric''' support a few different methods for transparency, each for different purposes | ||
{{MatParam|$alphatest|bool|Cheap transparency using a binary opacity mask.}} | {{MatParam|$alpha|bool|[[$alpha]] [[Cheap|Cheaply]] scales the opacity of an entire material.}} | ||
{{MatParam|$nocull|bool| | {{MatParam|$alphatest|bool|[[$alphatest]] is a [[Cheap]] transparency using a binary opacity mask.}} | ||
{{MatParam|$translucent|bool|Expensive translucency using a full | {{MatParam|$nocull|bool|[[$nocull]] disables backface culling optimization.}} | ||
{{MatParam|$ | {{MatParam|$translucent|bool|[[$translucent]] is a [[Expensive|expensive]] translucency using a full [[Alpha]] mask, for very fine gradients.<br/>{{note|Add material sorting issues}}}} | ||
{{MatParam|$additive|bool|[[$additive]] alike [[$translucent]] perform full [[Alpha]] mask, however it add colors instead of performing a multiplication. This renders in a always brighter material.}} | |||
{{MatParam|$distancealpha|bool|[[$distancealpha]] is a vector-like edge filtering.|since={{src07}}}} | |||
=== Lighting === | === Lighting === |
Revision as of 01:14, 21 March 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
$detail
$decaltexture
Adjustment
$color2
$basetexturetransform
[[$allowdiffusemodulation|$allowdiffusemodulation]]
$seperatedetailuvs
$desaturatewithbasealpha
[[$notint|$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
Reflection
Effect
$compress
$stretch
$flesh
$treeSway
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.