UnlitGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 12: Line 12:
Preferably, use the purpose-built [[Sky_(shader)|sky shader]] instead.
Preferably, use the purpose-built [[Sky_(shader)|sky shader]] instead.


== Parameters ==
== Supported Parameters ==
{{MatParam|[[$receiveflashlight]]|bool|Allow the player's flashlight to illuminate the material.}}
;{{ent|$color}}
{{MatParam|[[$singlepassflashlight]]|bool|Possibly used to allow shadows to form from this decal. For example, found in L4D2 decals/detail/ruraldetailsprites.vmt {{todo|confirm.}}}}
: Color tinting.
;{{ent|$translucent}}
: Specifies that the material should be partially see-through.
;{{ent|$alpha}}
: Expensive and cheap transparency.


== Supported effects ==
== Supported effects ==

Revision as of 04:48, 16 October 2021

English (en)Français (fr)中文 (zh)Translate (Translate)

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). It accepts only the most rudimentary of VMT commands.

Warning.pngWarning:If this shader is being used on a model, you must specify $model 1 to prevent errors.

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.

Supported Parameters

$color
Color tinting.
$translucent
Specifies that the material should be partially see-through.
$alpha
Expensive and cheap transparency.

Supported effects