首先回顾一下典型的纯金属与非金属的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
时间: 2024-10-13 11:42:30