Difference between revisions of "UnlitGeneric"

From Valve Developer Community
Jump to: navigation, search
(fake news)
(Minor grammar/formatting fixes)
Line 1: Line 1:
 
'''<code>UnlitGeneric</code>''' 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 prop]]s). It accepts only the most rudimentary of VMT commands.
 
'''<code>UnlitGeneric</code>''' 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 prop]]s). It accepts only the most rudimentary of VMT commands.
  
{{note|If this shader is being used on a [[model]], you must specify <code>[[$model]] 1</code>.}}
+
{{warning|If this shader is being used on a [[model]], you must specify <code>[[$model|$model 1]]</code> to prevent errors.}}
  
 
== Projected Texture Bugs ==
 
== Projected Texture Bugs ==
If a Skybox has an '''<code>UnlitGeneric</code>''' shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an '''<code>UnlitGeneric</code>''' shader, the Skybox will appear to ignore surrounding geometry and phase through walls for as long as the projected texture is active.
+
If a [[Skybox]] has an '''<code>UnlitGeneric</code>''' shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an '''<code>UnlitGeneric</code>''' 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.
 
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.
Line 13: Line 13:
 
: Allow the player's flashlight to illuminate the material.
 
: Allow the player's flashlight to illuminate the material.
 
; <code>$singlepassflashlight 1</code>
 
; <code>$singlepassflashlight 1</code>
: Possibly is used to allow shadows to form from this decal. For example, found in L4D2 decals/detail/ruraldetailsprites.vmt {{todo|confirm.}}
+
: Possibly used to allow shadows to form from this decal. For example, found in L4D2 decals/detail/ruraldetailsprites.vmt {{todo|confirm.}}
  
 
== Supported effects ==
 
== Supported effects ==

Revision as of 05:47, 17 December 2019

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: 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.

Parameters

$receiveflashlight 1
Allow the player's flashlight to illuminate the material.
$singlepassflashlight 1
Possibly used to allow shadows to form from this decal. For example, found in L4D2 decals/detail/ruraldetailsprites.vmt To do: confirm.

Supported effects