UnlitGeneric

From Valve Developer Community
< Zh
Revision as of 03:19, 24 April 2025 by MoRanYue (talk | contribs) (deepseek translation)
Jump to navigation Jump to search
Info content.png
This page is Machine translated
It is not recommended to use machine translation without any corrections.
If the article is not corrected in the long term, it will be removed.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Français (fr)中文 (zh)Translate (Translate)

UnlitGeneric 是一种不通过标准光照通道渲染漫反射(en)的着色器。通常用于UI图像、纯白或纯黑场景,也适用于使用软件光照的情况(如细节道具(en))。

支持参数

基础参数

$basetexture $surfaceprop $model

调整参数

$detail $color

透明参数

$alpha $alphatest $nocull $translucent $vertexalpha

纹理组织

%keywords %notooltexture %tooltexture

效果参数

$nofog

扩展参数

$receiveflashlight $singlepassflashlight $deferred

注意事项

投影纹理错误

若在天空盒(en)上使用UnlitGeneric着色器,可能出现视觉错误。特别是当投影纹理照射到使用该着色器的天空盒附近时,天空盒可能无视周围几何体并穿透墙体显示。

解决方案:确保场景中存在sky_camera(en)实体,通常放置在地图外部的独立天空盒中。

建议改用专用着色器Sky(en)

模型应用

模型(en)上使用此着色器时,必须指定$model 1(en)以避免错误。

Mapbase扩展

Mapbase(en)中的无光照材质应使用SDK_UnlitGeneric着色器。