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

$rimlight

From Valve Developer Community
< Zh
Revision as of 04:43, 4 January 2025 by MoRanYue (talk | contribs) (chatgpt translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
TF2重装兵(Heavy)使用边缘光照的示例。

$rimlight是一个用于着色器 VertexLitGeneric材质(en)着色器(en)参数,可在所有的 起源 起源 游戏,自从 起源2007 起源2007 以来中使用。 它为模型添加了一种恒定的边缘光,看起来像是间接来自环境的光照。边缘光的颜色直接受到环境光(en)的影响,并且行为更接近于$phongfresnelrangesZ分量(en)

Note.png注意:需要将$phong设置为1。
Note.png注意:边缘光需要$bumpmap才能生效,因为$phong也需要它。
待完善: 解释Phong Fresnel范围的相似点和不同点。
Warning.png警告:求生之路系列求生之路系列中无明显效果。然而,可以通过增加$phongfresnelranges的Z向量来实现更接近的效果。

VMT语法

$rimlight <bool>
 VertexLitGeneric
{
	$phong			1

	$bumpmap		<texture>
	$phongexponent		5		
	$phongexponenttexture	<texture>	
	$phongboost		1.0
	$phongfresnelranges	"[0 0.5 1]"

	$rimlight               1
	$rimlightexponent       2
	$rimlightboost          .2			
}

附加参数

$rimlightexponent $rimlightboost $rimmask $phongtint

另请参阅