Closed tigrazone closed 10 months ago
Rd stands for diffuse reflectance and Rs is the specular reflectance. Consequently, the BRDF for diffuse surfaces is Rd / PI
(I.e albedo
is Rd). So I think the current version should be correct. Regarding the pow5
fix, I'll add it when I start rework/reorganize the BSDF backend.
maybe this issue connected with https://github.com/yuphin/Lumen/issues/25
when we read https://www.pbr-book.org/3ed-2018/Reflection_Models/Fresnel_Incidence_Effects
and if we compare with glossy_f():
(1 - mat.metalness) is Rd mat.metalness is Rs and then right version of calc f_diffuse is
Real working #define pow5(x) ((x)(x)(x)(x)(x)) can show you this error and my code is fixes it