码迷,mamicode.com
首页 > Web开发 > 详细

PBR中的Metallic/Roughness工作流

时间:2015-04-22 11:16:35      阅读:1136      评论:0      收藏:0      [点我收藏+]

标签:

首先回顾一下典型的纯金属与非金属的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

PBR中的Metallic/Roughness工作流

标签:

原文地址:http://www.cnblogs.com/neoragex2002/p/4446713.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!