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:
authorBrecht Van Lommel <brecht@blender.org>2021-10-07 18:27:22 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-11 19:22:54 +0300
commit73a05ff9e83a31be34d32a92cd5fb4d17994e342 (patch)
tree06f0312affd92e58393216186f1519125a7c302c /intern/cycles/kernel/svm
parent40360253aefd1f3451d5b413595bcbb143425b84 (diff)
Cycles: restore Christensen-Burley SSS
There is not enough time before the release to improve Random Walk to handle all cases this was used for, so restore it for now. Since there is no more path splitting in cycles-x, this can increase noise in non-flat areas for the sample number of samples, though fewer rays will be traced also. This is fundamentally a trade-off we made in the new design and why Random Walk is a better fit. However the importance resampling we do now does help to reduce noise. Differential Revision: https://developer.blender.org/D12800
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r--intern/cycles/kernel/svm/svm_closure.h1
-rw-r--r--intern/cycles/kernel/svm/svm_types.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h
index 3e0cbe3a483..b3f7fee8a63 100644
--- a/intern/cycles/kernel/svm/svm_closure.h
+++ b/intern/cycles/kernel/svm/svm_closure.h
@@ -885,6 +885,7 @@ ccl_device_noinline int svm_node_closure_bsdf(
#endif /* __HAIR__ */
#ifdef __SUBSURFACE__
+ case CLOSURE_BSSRDF_BURLEY_ID:
case CLOSURE_BSSRDF_RANDOM_WALK_ID:
case CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID: {
float3 weight = sd->svm_closure_weight * mix_weight;
diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 59a0e33acbc..e846e4af259 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -543,6 +543,7 @@ typedef enum ClosureType {
CLOSURE_BSDF_TRANSPARENT_ID,
/* BSSRDF */
+ CLOSURE_BSSRDF_BURLEY_ID,
CLOSURE_BSSRDF_RANDOM_WALK_ID,
CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID,
@@ -589,7 +590,7 @@ typedef enum ClosureType {
type == CLOSURE_BSDF_MICROFACET_GGX_CLEARCOAT_ID)
#define CLOSURE_IS_BSDF_OR_BSSRDF(type) (type <= CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID)
#define CLOSURE_IS_BSSRDF(type) \
- (type >= CLOSURE_BSSRDF_RANDOM_WALK_ID && type <= CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID)
+ (type >= CLOSURE_BSSRDF_BURLEY_ID && type <= CLOSURE_BSSRDF_RANDOM_WALK_FIXED_RADIUS_ID)
#define CLOSURE_IS_VOLUME(type) \
(type >= CLOSURE_VOLUME_ID && type <= CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID)
#define CLOSURE_IS_VOLUME_SCATTER(type) (type == CLOSURE_VOLUME_HENYEY_GREENSTEIN_ID)