$fresnelrangestexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Control Fresnel Term)
 
m (Nesciuse moved page $fresnelrangestexture/en to $fresnelrangestexture without leaving a redirect: Move en subpage to basepage)
 
(9 intermediate revisions by 7 users not shown)
Line 1: Line 1:
fresnelrangestexture 是由几张 1d贴图合并而来的2d 贴图来控制 blinn-phong 高光(specular)与背光(rimlight)的菲涅尔效应(Fresnel term)
{{LanguageBar}}
该贴图的V坐标对应WarpIndex,如果存在$masks1的alpha通道,则可以通过alpha控制WarpIndex来选取不同的菲涅尔映射,
该贴图的U坐标对应对Fresnel数值的映射关系(Fresnel的强度对应U的坐标数值)


当存在 $fresnelrangestexture 时 $phongfresnelranges 无效,菲涅尔(Fresnel)会强制使用 归一化的 VdotN 作为恒定的采样值以映射fresnelrangestexture


fresnelrangestexture由rgb三个通道构成
'''<code>$fresnelrangestexture</code>''' is a 2d texture merged from several 1d textures to control the Fresnel term of blinn-[[phong]] specular and [[$rimlight]].
通道R:无作用
 
通道G:采样后,重新映射VdotN,获得最终blinn-phong 高光(specular)的Fresnel遮罩
 
通道B:采样后,与$masks1的RimMask(R通道)相乘获得 AmbientReflection(与环境相关的rimlight)的 Fresnel遮罩
* The V coordinate of the texture corresponds to [[$warpindex]]. If there is an alpha channel of [[$masks1]], you can control $warpindex through alpha to select different Fresnel mappings.
 
* The U coordinate of the texture corresponds to the mapping relationship to the Fresnel value. The intensity of Fresnel corresponds to the coordinate value of U.
 
 
 
 
''When $fresnelrangestexture exists, [[$phongfresnelranges]] is invalid''
 
''Fresnel will force the use of normalized VdotN as a constant sampling value to map fresnelrangestexture''
 
 
<code>$fresnelrangestexture</code> consists of three channels of RGB:
# Channel R: No effect
# Channel G: After sampling, remap VdotN to obtain the final blinn-phong specular Fresnel mask
# Channel B: After sampling, multiply it with the RimMask (R channel) of $masks1 to obtain the Fresnel mask of AmbientReflection (rimlight related to the environment)
 
[[Category:Shader parameters|fresnelrangestexture]]

Latest revision as of 03:31, 12 July 2024

English (en)中文 (zh)Translate (Translate)


$fresnelrangestexture is a 2d texture merged from several 1d textures to control the Fresnel term of blinn-phong specular and $rimlight.


  • The V coordinate of the texture corresponds to $warpindex. If there is an alpha channel of $masks1, you can control $warpindex through alpha to select different Fresnel mappings.
  • The U coordinate of the texture corresponds to the mapping relationship to the Fresnel value. The intensity of Fresnel corresponds to the coordinate value of U.



When $fresnelrangestexture exists, $phongfresnelranges is invalid

Fresnel will force the use of normalized VdotN as a constant sampling value to map fresnelrangestexture


$fresnelrangestexture consists of three channels of RGB:

  1. Channel R: No effect
  2. Channel G: After sampling, remap VdotN to obtain the final blinn-phong specular Fresnel mask
  3. Channel B: After sampling, multiply it with the RimMask (R channel) of $masks1 to obtain the Fresnel mask of AmbientReflection (rimlight related to the environment)