Zh/UnlitGeneric: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{subst:#if: Translation of 'UnlitGeneric' to '中文' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...")
 
No edit summary
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
{{wip}}{{translating}}
 
--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
 
SEARCH FOR:
\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special|)(?:[^\|\]]+))(\|?.*?)\]\]
 
REPLACE WITH:
{{subst:LAuto|$1$2}}
 
}}{{wip}}{{translating}}
{{LanguageBar}}
{{LanguageBar}}


'''{{code|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).
'''{{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 [[$surfaceprop|surface]] to a set of physical properties.}}
{{MatParam|$surfaceprop|string|Links the {{L|$surfaceprop|surface}} to a set of physical properties.}}
{{MatParam|$model|bool|Tells this material is used for [[3D Model|models]] and not [[Brush|brushes]].}}
{{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 [[displacement]]s}}
{{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 [[Hammer]].}}
{{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 [[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.
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 [[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 {{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|[[Sky_(shader)|Sky]]}}''' shader instead.
Preferably, use the purpose-built '''{{code|{{L|Sky_(shader)|Sky}}}}''' shader instead.


=== Models ===
=== Models ===
If this shader is being used on a [[model]], you must specify {{code|[[$model_(VMT)|$model 1]]}} to prevent errors.
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 [[Mapbase]] should have the shader '''{{code|SDK_UnlitGeneric}}'''.
Unlit materials in {{L|Mapbase}} should have the shader '''{{code|SDK_UnlitGeneric}}'''.
[[Category:Shaders]]
{{ACategory|Shaders}}
[[Category:Stubs]]
{{ACategory|Stubs}}

Revision as of 03:17, 24 April 2025

Under construction.png
This page is actively undergoing a major edit.
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.

Info content.png
This page is being translated.
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.(en)
English (en)Français (fr)中文 (zh)Translate (Translate)

UnlitGeneric draws a diffuse(en) 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(en)s).

Supported Parameters

Basics

$basetexture $surfaceprop $model

Adjustment

$detail $color

Transparency

$alpha $alphatest $nocull $translucent $vertexalpha

Texture Organization

%keywords %notooltexture %tooltexture

Effect

$nofog

Additional Parameters

$receiveflashlight $singlepassflashlight $deferred

Caveats

Projected Texture Bugs

If a Skybox(en) 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(en) exists in the world, typically in its own box which exists outside of the rest of the map.

Preferably, use the purpose-built Sky(en) shader instead.

Models

If this shader is being used on a model(en), you must specify $model 1(en) to prevent errors.

Mapbase

Unlit materials in Mapbase(en) should have the shader SDK_UnlitGeneric.