Zh/UnlitGeneric: Difference between revisions
(Created page with "{{subst:#if: Translation of 'UnlitGeneric' to '中文' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{wip}}{{translating}} | |||
{{LanguageBar}} | {{LanguageBar}} | ||
'''{{code|UnlitGeneric}}''' draws a | '''{{code|UnlitGeneric}}''' draws a {{L|diffuse}} 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 {{L|detail prop}}s). | ||
== Supported Parameters == | == Supported Parameters == | ||
Line 18: | Line 8: | ||
=== Basics === | === Basics === | ||
{{MatParam|$basetexture|texture|Defines a diffuse texture.}} | {{MatParam|$basetexture|texture|Defines a diffuse texture.}} | ||
{{MatParam|$surfaceprop|string|Links the | {{MatParam|$surfaceprop|string|Links the {{L|$surfaceprop|surface}} to a set of physical properties.}} | ||
{{MatParam|$model|bool|Tells this material is used for | {{MatParam|$model|bool|Tells this material is used for {{L|3D Model|models}} and not {{L|Brush|brushes}}.}} | ||
=== Adjustment === | === Adjustment === | ||
Line 30: | Line 20: | ||
{{MatParam|$nocull|bool|Disables backface culling, resulting in triangles showing from both sides.}} | {{MatParam|$nocull|bool|Disables backface culling, resulting in triangles showing from both sides.}} | ||
{{MatParam|$translucent|bool|Specifies that the material should be partially see-through.}} | {{MatParam|$translucent|bool|Specifies that the material should be partially see-through.}} | ||
{{MatParam|$vertexalpha|bool|Per-vertex translucency on | {{MatParam|$vertexalpha|bool|Per-vertex translucency on {{L|displacement}}s}} | ||
=== Texture Organization === | === Texture Organization === | ||
{{MatParam|%keywords|string|Sets a keyword filter that can be filtered in hammer for easier texture finding.}} | {{MatParam|%keywords|string|Sets a keyword filter that can be filtered in hammer for easier texture finding.}} | ||
{{MatParam|%notooltexture|bool|Hides the material from Hammer's texture browser.}} | {{MatParam|%notooltexture|bool|Hides the material from Hammer's texture browser.}} | ||
{{MatParam|%tooltexture|texture|Used to blend texture previews in | {{MatParam|%tooltexture|texture|Used to blend texture previews in {{L|Hammer}}.}} | ||
=== Effect === | === Effect === | ||
Line 49: | Line 39: | ||
=== Projected Texture Bugs === | === Projected Texture Bugs === | ||
If a | If a {{L|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 may appear to ignore surrounding geometry and phase through walls for as long as the projected texture is active. | ||
To fix this, ensure that a | To fix this, ensure that a {{L|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| | Preferably, use the purpose-built '''{{code|{{L|Sky_(shader)|Sky}}}}''' shader instead. | ||
=== Models === | === Models === | ||
If this shader is being used on a | If this shader is being used on a {{L|model}}, you must specify {{code|{{L|$model_(VMT)|$model 1}}}} to prevent errors. | ||
=== Mapbase === | === Mapbase === | ||
Unlit materials in | Unlit materials in {{L|Mapbase}} should have the shader '''{{code|SDK_UnlitGeneric}}'''. | ||
{{ACategory|Shaders}} | |||
{{ACategory|Stubs}} |
Revision as of 03:17, 24 April 2025

As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
The person who added this notice will be listed in its edit history should you wish to contact them.

You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.
UnlitGeneric draws a diffuse 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
Basics
$basetexture
$surfaceprop
$model
Adjustment
Transparency
$alpha
$alphatest
$nocull
$translucent
$vertexalpha
Texture Organization
%keywords
%notooltexture
%tooltexture
Effect
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 may 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.