Cycles: Refactor closure roughness detection to fix a potential bug with Denoising of specular shaders
This commit is contained in:
@@ -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_is_specular_like(sc)) {
|
||||
if(bsdf_get_roughness_sqr(sc) > sqr(0.075f)) {
|
||||
albedo += sc->weight;
|
||||
sum_nonspecular_weight += sc->sample_weight;
|
||||
}
|
||||
|
Reference in New Issue
Block a user