Cycles: take into account diffuse roughness for roughness baking.
Roughness baking previously defaulted to 1.0 for all diffuse materials, now we also bake roughness values of Oren-Nayer and Principled Diffuse. Differential Revision: https://developer.blender.org/D3115
This commit is contained in:

committed by
Brecht Van Lommel

parent
1953de335e
commit
e3f1d98098
@@ -140,7 +140,7 @@ ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg,
|
||||
/* All closures contribute to the normal feature, but only diffuse-like ones to the albedo. */
|
||||
normal += sc->N * sc->sample_weight;
|
||||
sum_weight += sc->sample_weight;
|
||||
if(bsdf_get_roughness_squared(sc) > sqr(0.075f)) {
|
||||
if(bsdf_get_specular_roughness_squared(sc) > sqr(0.075f)) {
|
||||
albedo += sc->weight;
|
||||
sum_nonspecular_weight += sc->sample_weight;
|
||||
}
|
||||
|
Reference in New Issue
Block a user