SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
979 stars 132 forks source link

why is the diffuseColor scaled by (vec3(1.0) - f0)? #50

Closed bigbike closed 3 years ago

bigbike commented 3 years ago

https://github.com/SaschaWillems/Vulkan-glTF-PBR/blob/c937e7e0c619ac771b8477867caceb767fee851f/data/shaders/pbr_khr.frag#L291

bigbike commented 3 years ago

OK, I found it in the gltf spec:

c_diff = lerp(baseColor.rgb * (1 - dielectricSpecular), black, metallic)

This is a false alarm. I sincerely apologize.