VertexLitGeneric
< Zh
Jump to navigation
Jump to search
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.
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.
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.
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是顶点着色器,可在所有的
起源 游戏中使用。 这是渲染模型最常用的着色器,支持多种特效效果。请勿用于世界几何体,否则可能引发光照错误。
支持参数
基础参数
- $basetexture <texture>
- $basetexture定义漫反射纹理。
- $decaltexture <texture> (仅存在于
之中)
- 使用第二UV通道支持高分辨率贴花。
调整参数
- $color2 <RGB matrix>
- 颜色染色效果。
- $basetexturetransform <matrix>
- 变换$basetexture的对齐、缩放、旋转和位置。
- $allowdiffusemodulation <布尔值> (存在于自
以来)
- 阻止模型材质被$color2或
rendercolor染色。
- $seperatedetailuvs <布尔值> (存在于自
以来)
- 待完善: 确认是否使用texcoord1处理细节纹理
- $desaturatewithbasealpha <浮点型> (存在于自
以来)
- 使用基础alpha通道对基础纹理去色。非零值启用,该值在去色前与alpha通道相乘。
透明参数
VertexLitGeneric支持多种透明处理方式:
- $alphatest <布尔值>
- $alphatest使用Cheap二值化透明遮罩。
- $translucent <布尔值>
- $translucent通过完整透明通道实现高开销半透明,适用于精细渐变。
注意: 可能引发材质排序问题
- $additive <布尔值>
- $additive类似$translucent但采用加法混合,始终呈现更亮效果。
- $distancealpha <布尔值> (存在于自
以来)
- $distancealpha实现矢量式边缘过滤。
光照参数
- $lightwarptexture <texture> (存在于自
以来)
- 通过一维扭曲纹理实现逐像素颜色调整。
- $halflambert <布尔值>
- 启用半兰伯特着色。
- $selfillum <布尔值>
- 启用自发光效果(不受环境光照影响)。
- $emissiveblendenabled <布尔值> (存在于自
以来)
- 高级流动自发光效果,曾用于
半衰期2:第二章中的弗提冈。
反射参数
特效参数
技术调整
- $flashlightnolambert <布尔值> (存在于自
以来)
- 使投影纹理(如手电筒)忽略模型表面法线。适用于$nocull模型(如植被)。默认0。
- $lowqualityflashlightshadows <布尔值> (存在于自
以来)
- 强制低质量手电筒/投影纹理阴影以提升性能。
- $allowfencerenderstatehack <布尔值> (存在于自
以来)
- 针对级联阴影映射的栅栏渲染修正。
- $disablecsmlookup <布尔值> (存在于自
以来)
- 禁用级联阴影映射查询/过滤,适用于密集植被。
- $noshadowpass <布尔值> (仅存在于
之中)
- 禁用该材质的阴影渲染阶段。
- $nodeferredlight <布尔值> (仅存在于
之中)
- 禁用延迟光照输入。
- $modelglobalnormal <布尔值> (仅存在于
之中)
- 为所有模型顶点使用全局光源方向作为法线。
隐身效果
VertexLitGeneric原生支持
军团要塞2中间谍隐身特效。结合正弦波材质代理可实现完整效果。
- $cloakpassenabled <布尔值>
- 启用隐身效果。
警告: 在静态道具上启用会导致严重性能损耗,即使未实际使用隐身效果!
- $cloakfactor <normal>
- 0.00 = 完全可见,
1.00 = 完全不可见。
- $cloakcolortint <RGB matrix>
- 折射效果染色。默认值"[1 1 1]"。
- $refractamount <浮点型>
- 部分隐身时的折射强度。默认值2。
注意事项
Mapbase扩展
Mapbase中的VertexLitGeneric材质应使用SDK_VertexLitGeneric着色器。
相关链接
- 模型材质指南
- EyeRefract(眼球折射着色器)
- Teeth(牙齿着色器)