PBR中的Metallic/Roughness工作流

首先回顾一下典型的纯金属与非金属的PBR属性:

  • 纯金属:
    • Albedo(diff): 0
    • F0(spec): >0.3
    • Metallic: 1
  • 非金属:
    • Albedo(diff):可为非0值
    • F0(spec):0-0.08
    • Metallic: 0

已知某Materail的BaseColor、Metallic、SpecularScale(默认值为0.5),欲求其diff与spec,则有如下公式:

half DielectricSpecular = 0.08 * SpecularScale;
half3 DiffuseColor = BaseColor * (1 - Metallic);
half3 SpecularColor = DielectricSpecular * (1 - Metallic) + BaseColor * Metallic; 

 则有:

  • 对于纯金属而言:
    • DiffuseColor=0
    • SpecularColor = BaseColor
  • 对于非金属而言:
    • DiffuseColor = BaseColor
    • SpecularColor = DielectricSpecular = 0.08 * SpecularScale
  • 对于介于两者之间的而言:
    • DiffuseColor = BaseColor * (1 - Metallic)
    • SpecularColor = 0.08 * SpecularScale * (1 - Metallic) + BaseColor * Metallic

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。