Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2017-06-21 03:57:58 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-06-22 01:09:56 +0300
commit1979176088047794813399baf85ff496c4fe456e (patch)
tree7db8f8d591c1a78fd04d421f415e555f20372996 /intern/cycles/kernel/svm
parent8cb741a598d6898328e0666c2cafddaaf9d830fd (diff)
Cycles: Fix excessive sampling weight of glossy Principled BSDF components
If there was any specularity in the Principled BSDF, it would get a sampling weight of one regardless of its actual impact. This commit makes Cycles estimate the contribution of the component and adjust the weighting accordingly, which greatly improves the noise characteristics of the Principled BSDF in many cases. Note that this commit might slightly change the brightness of areas when using MultiGGX and high roughnesses, but the new brightness is more accurate and closer to the result of Branched Path Tracing. See T51836 for details. Differential Revision: https://developer.blender.org/D2677
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r--intern/cycles/kernel/svm/svm_closure.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h
index c05da61ba5a..844245ee2d4 100644
--- a/intern/cycles/kernel/svm/svm_closure.h
+++ b/intern/cycles/kernel/svm/svm_closure.h
@@ -292,9 +292,9 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
/* setup bsdf */
if(distribution == CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID || roughness <= 0.075f) /* use single-scatter GGX */
- sd->flag |= bsdf_microfacet_ggx_aniso_fresnel_setup(bsdf);
+ sd->flag |= bsdf_microfacet_ggx_aniso_fresnel_setup(bsdf, sd);
else /* use multi-scatter GGX */
- sd->flag |= bsdf_microfacet_multi_ggx_aniso_fresnel_setup(bsdf);
+ sd->flag |= bsdf_microfacet_multi_ggx_aniso_fresnel_setup(bsdf, sd);
}
}
#ifdef __CAUSTICS_TRICKS__
@@ -332,7 +332,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
bsdf->extra->cspec0 = cspec0;
/* setup bsdf */
- sd->flag |= bsdf_microfacet_ggx_fresnel_setup(bsdf);
+ sd->flag |= bsdf_microfacet_ggx_fresnel_setup(bsdf, sd);
}
}
@@ -377,7 +377,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
bsdf->extra->cspec0 = cspec0;
/* setup bsdf */
- sd->flag |= bsdf_microfacet_multi_ggx_glass_fresnel_setup(bsdf);
+ sd->flag |= bsdf_microfacet_multi_ggx_glass_fresnel_setup(bsdf, sd);
}
}
}
@@ -405,7 +405,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
bsdf->extra->clearcoat = clearcoat;
/* setup bsdf */
- sd->flag |= bsdf_microfacet_ggx_clearcoat_setup(bsdf);
+ sd->flag |= bsdf_microfacet_ggx_clearcoat_setup(bsdf, sd);
}
}
#ifdef __CAUSTICS_TRICKS__