UnlitGeneric: Difference between revisions
(Fix MatParams) |
|||
Line 6: | Line 6: | ||
=== Basics === | === Basics === | ||
{{MatParam| | {{MatParam|$basetexture|texture|Defines an albedo texture.}} | ||
{{MatParam| | {{MatParam|$surfaceprop|string|Links the [[$surfaceprop|surface]] to a set of physical properties.}} | ||
{{MatParam | {{MatParam|$model|bool|Tells this material is used for [[3D Model|models]] and not [[Brush|brushes]].}} | ||
=== Adjustment === | === Adjustment === | ||
{{MatParam| | {{MatParam|$color|RGB matrix|Independently scales the red, green and blue channels of an albedo.}} | ||
=== Transparency === | === Transparency === | ||
{{MatParam| | {{MatParam|$alpha|normal|Scales the opacity of an entire material.}} | ||
{{MatParam| | {{MatParam|$alphatest|bool|Specifies a mask to use to determine binary opacity.}} | ||
{{MatParam| | {{MatParam|$nocull|bool|Disables backface culling, resulting in triangles showing from both sides.}} | ||
{{MatParam| | {{MatParam|$translucent|bool|Specifies that the material should be partially see-through.}} | ||
=== Texture Organization === | === Texture Organization === | ||
{{MatParam| | {{MatParam|%keywords|string|Sets a keyword filter that can be filtered in hammer for easier texture finding.}} | ||
{{MatParam| | {{MatParam|%notooltexture|bool|Hides the material from Hammer's texture browser.}} | ||
{{MatParam| | {{MatParam|%tooltexture|texture|Used to blend texture previews in [[Hammer]].}} | ||
=== Effect === | === Effect === | ||
{{MatParam| | {{MatParam|$nofog|bool|Prevents fog from overdrawing a material.}} | ||
== Additional Parameters == | == Additional Parameters == | ||
{{MatParam| | {{MatParam|$receiveflashlight|bool|Allow the player's flashlight to illuminate the material.}} | ||
{{MatParam| | {{MatParam|$singlepassflashlight|bool|Possibly used to allow shadows to form from this decal.<br/>For example, found in L4D2 ''decals/detail/ruraldetailsprites.vmt''<br/>{{todo|confirm.}}}} | ||
== Caveats == | == Caveats == |
Revision as of 19:30, 24 September 2023
UnlitGeneric
draws an albedo without standard lighting passes. It is used for things like UI images, pure white, and pitch blackness, but also in situations when software lighting is used (like on detail props).
Supported Parameters
Basics
$basetexture
$surfaceprop
$model
Adjustment
Transparency
$alpha
$alphatest
$nocull
$translucent
Texture Organization
%keywords
%notooltexture
%tooltexture
Effect
Additional Parameters
$receiveflashlight
$singlepassflashlight
Caveats
Projected Texture Bugs
If a Skybox has an UnlitGeneric
shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an UnlitGeneric
shader, the Skybox will appear to ignore surrounding geometry and phase through walls for as long as the projected texture is active.
To fix this, ensure that a sky_camera exists in the world, typically in its own box which exists outside of the rest of the map.
Preferably, use the purpose-built Sky
shader instead.
Models
If this shader is being used on a model, you must specify $model 1
to prevent errors.
Mapbase
Unlit materials in Mapbase should have the shader SDK_UnlitGeneric
.