UnlitGeneric: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Changing some stuff in order to add Template:MultiPage.)
Line 1: Line 1:
{{lang | UnlitGeneric}}
{{langsp}}


'''<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).
'''{{code|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 prop]]s).


== Supported Parameters ==
== Supported Parameters ==
Line 36: Line 36:


=== 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}}''' shader applied to it, some visual bugs can occur. Notably, if a projected texture is shone near a Skybox using an '''{{code|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.
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 '''<code>[[Sky_(shader)|Sky]]</code>''' shader instead.
Preferably, use the purpose-built '''{{code|[[Sky_(shader)|Sky]]}}''' shader instead.


=== Models ===
=== Models ===
If this shader is being used on a [[model]], you must specify <code>[[$model_(VMT)|$model 1]]</code> to prevent errors.
If this shader is being used on a [[model]], you must specify {{code|[[$model_(VMT)|$model 1]]}} to prevent errors.


=== Mapbase ===
=== Mapbase ===
Unlit materials in [[Mapbase]] should have the shader '''<code>SDK_UnlitGeneric</code>'''.
Unlit materials in [[Mapbase]] should have the shader '''{{code|SDK_UnlitGeneric}}'''.
 
[[Category:Shaders]]
[[Category:Stubs]]

Revision as of 22:03, 23 May 2024

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

Supported Parameters

Basics

$basetexture $surfaceprop $model

Adjustment

$color

Transparency

$alpha $alphatest $nocull $translucent

Texture Organization

%keywords %notooltexture %tooltexture

Effect

$nofog

Additional Parameters

$receiveflashlight $singlepassflashlight $deferred

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.