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 <brechtvanlommel@gmail.com>2018-02-20 16:22:40 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-22 02:55:32 +0300
commit2d81758aa650256d6b6ed283e43b6c35808ed205 (patch)
treedb336da6924982031bbcc30844b496d600fd407a /intern/cycles/kernel/svm/svm_closure.h
parent84e92f9b3c50433221a4c30f3a14713d99680f3a (diff)
Cycles: better path termination for transparency.
We now continue transparent paths after diffuse/glossy/transmission/volume bounces are exceeded. This avoids unexpected boundaries in volumes with transparent boundaries. It is also required for MIS to work correctly with transparent surfaces, as we also continue through these in shadow rays. The main visible changes is that volumes will now be lit by the background even at volume bounces 0, same as surfaces. Fixes T53914 and T54103.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_closure.h')
-rw-r--r--intern/cycles/kernel/svm/svm_closure.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/svm_closure.h b/intern/cycles/kernel/svm/svm_closure.h
index 5398f36c267..24452c81fe0 100644
--- a/intern/cycles/kernel/svm/svm_closure.h
+++ b/intern/cycles/kernel/svm/svm_closure.h
@@ -449,7 +449,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
}
case CLOSURE_BSDF_TRANSPARENT_ID: {
float3 weight = sd->svm_closure_weight * mix_weight;
- bsdf_transparent_setup(sd, weight);
+ bsdf_transparent_setup(sd, weight, path_flag);
break;
}
case CLOSURE_BSDF_REFLECTION_ID:
@@ -728,7 +728,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
* the throughput can blow up after multiple bounces. we
* better figure out a way to skip backfaces from rays
* spawned by transmission from the front */
- bsdf_transparent_setup(sd, make_float3(1.0f, 1.0f, 1.0f));
+ bsdf_transparent_setup(sd, make_float3(1.0f, 1.0f, 1.0f), path_flag);
}
else {
HairBsdf *bsdf = (HairBsdf*)bsdf_alloc(sd, sizeof(HairBsdf), weight);