这篇条目有关 Source引擎。如需详情,点击这里。

VertexLitGeneric

From Valve Developer Community
< Zh
Jump to navigation Jump to search
English (en)Français (fr)中文 (zh)Translate (Translate)
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)
This notice is put here by LanguageBar template and if you want to remove it after updating the translation you can do so on this page.


VertexLitGeneric是一个顶点着色器(en),可在所有的 起源 起源 游戏中使用。 这是渲染模型(en)最常用的着色器,支持多种特效效果。请勿用于世界几何体,否则可能引发光照错误。

支持参数

基础参数

细节(en)纹理混合。
$decaltexture(en) <texture(en)> (存在于 反恐精英:全球攻势 之中)
使用第二UV通道支持高分辨率贴花。

调整参数

变换(en)$basetexture(en)的对齐、缩放、旋转和位置。
$allowdiffusemodulation(en) <布尔值(en)> (存在于自 求生之路 以来)
阻止模型材质被$color2(en)rendercolor染色。
$seperatedetailuvs(en) <布尔值(en)> (存在于自 起源2007 以来)
待完善: 确认是否使用texcoord1处理细节(en)纹理
$desaturatewithbasealpha(en) <浮点型(en)> (存在于自 异形丛生 以来)
使用基础alpha通道对基础纹理去色。非零值启用,该值在去色前与alpha通道相乘。
$notint(en) <布尔值(en)> (存在于 反恐精英:全球攻势 之中) (也存在于 传送门 2:社区特供版 之中)
阻止模型材质被$color2(en)rendercolor染色。

透明参数

VertexLitGeneric支持多种透明处理方式:

$alpha(en)通过低开销(en)方式整体调节材质透明度。
证实:该参数在所有引擎分支是否有效?在起源2013 多人分支中无效
$alphatest(en)使用Cheap(en)二值化透明遮罩。
$nocull(en)禁用背面剔除优化。
$translucent(en)通过完整透明通道(en)实现高开销(en)半透明,适用于精细渐变。
Note.png注意:可能引发材质排序问题
$additive(en)类似$translucent(en)但采用加法混合,始终呈现更亮效果。
$distancealpha(en) <布尔值(en)> (存在于自 起源2007 以来)
$distancealpha(en)实现矢量式边缘过滤。

光照参数

$lightwarptexture(en) <texture(en)> (存在于自 起源2006 以来)
通过一维扭曲纹理(en)实现逐像素颜色调整。
启用半兰伯特(en)着色。
启用自发光(en)效果(不受环境光照影响)。
$emissiveblendenabled(en) <布尔值(en)> (存在于自 起源2007 以来)
$lightmap(en) <texture(en)> (存在于 起源2013 多人分支 之中) (也存在于 Garry's Mod 之中)
预烘焙光照贴图(en);受限制条件(en)约束。

反射参数

镜面反射(en)效果。
$phong(en) <布尔值(en)> (存在于自 起源2006 以来)
漫反射(en)效果。
$rimlight(en) <布尔值(en)> (存在于自 起源2007 以来)
基于phong(en)和环境光的恒定边缘光(en)

特效参数

$compress(en) <texture(en)> (存在于自 起源2007 以来)
角色面部的皱纹贴图(en)
$stretch(en) <texture(en)> (存在于自 起源2007 以来)
角色面部的皱纹贴图(en)
$flesh(en) <布尔值(en)> (存在于自 起源2007 以来)
用于《半衰期2:第二章》艾丽克斯的皮肤(en)特效。
$treeSway(en) <布尔值(en)> (存在于自 求生之路 以来) (也存在于 军团要塞2MapbaseGarry's Mod黑山 之中)
通过顶点操作实现树木随风摆动(en)效果。

技术调整

$flashlightnolambert(en) <布尔值(en)> (存在于自 起源2007 以来)
使投影纹理(en)(如手电筒)忽略模型表面法线。适用于$nocull模型(如植被)。默认0。
$lowqualityflashlightshadows(en) <布尔值(en)> (存在于自 传送门2 以来)
强制低质量手电筒/投影纹理阴影以提升性能。
$allowfencerenderstatehack(en) <布尔值(en)> (存在于自 反恐精英:全球攻势 以来)
针对级联阴影映射的栅栏渲染修正。
$disablecsmlookup(en) <布尔值(en)> (存在于自 反恐精英:全球攻势 以来)
禁用级联阴影映射查询/过滤,适用于密集植被。
$noshadowpass(en) <布尔值(en)> (存在于 Lambda Wars 之中)
禁用该材质的阴影渲染阶段。
$nodeferredlight(en) <布尔值(en)> (存在于 Lambda Wars 之中)
禁用延迟光照输入。
$modelglobalnormal(en) <布尔值(en)> (存在于 Lambda Wars 之中)
为所有模型顶点使用全局光源方向作为法线。

隐身效果

VertexLitGeneric原生支持军团要塞2 Team Fortress 2 中间谍隐身特效。结合正弦波材质代理(en)可实现完整效果。

启用隐身效果。
Warning.png警告:在静态道具上启用会导致严重性能损耗,即使未实际使用隐身效果!
0.00 = 完全可见,
1.00 = 完全不可见。
折射效果染色。默认值"[1 1 1]"。
部分隐身时的折射强度。默认值2。

注意事项

Mapbase扩展

Mapbase(en)中的VertexLitGeneric材质应使用SDK_VertexLitGeneric着色器。

相关链接