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:
-rw-r--r--intern/cycles/kernel/kernel_accumulate.h30
-rw-r--r--intern/cycles/kernel/kernel_path.h1
2 files changed, 12 insertions, 19 deletions
diff --git a/intern/cycles/kernel/kernel_accumulate.h b/intern/cycles/kernel/kernel_accumulate.h
index 7d9aaf81906..7860913ce94 100644
--- a/intern/cycles/kernel/kernel_accumulate.h
+++ b/intern/cycles/kernel/kernel_accumulate.h
@@ -151,26 +151,20 @@ __device_inline void path_radiance_bsdf_bounce(PathRadiance *L, float3 *throughp
#ifdef __PASSES__
if(L->use_light_pass) {
- if(bounce == 0) {
- if(bsdf_label & LABEL_TRANSPARENT) {
- /* transparent bounce before first hit */
- *throughput *= bsdf_eval->transparent*inverse_pdf;
- }
- else {
- /* first on directly visible surface */
- float3 value = *throughput*inverse_pdf;
-
- L->indirect_diffuse = bsdf_eval->diffuse*value;
- L->indirect_glossy = bsdf_eval->glossy*value;
- L->indirect_transmission = bsdf_eval->transmission*value;
-
- *throughput = L->indirect_diffuse + L->indirect_glossy + L->indirect_transmission;
-
- L->direct_throughput = *throughput;
- }
+ if(bounce == 0 && !(bsdf_label & LABEL_TRANSPARENT)) {
+ /* first on directly visible surface */
+ float3 value = *throughput*inverse_pdf;
+
+ L->indirect_diffuse = bsdf_eval->diffuse*value;
+ L->indirect_glossy = bsdf_eval->glossy*value;
+ L->indirect_transmission = bsdf_eval->transmission*value;
+
+ *throughput = L->indirect_diffuse + L->indirect_glossy + L->indirect_transmission;
+
+ L->direct_throughput = *throughput;
}
else {
- /* indirectly visible through BSDF */
+ /* transparent bounce before first hit, or indirectly visible through BSDF */
float3 sum = (bsdf_eval->diffuse + bsdf_eval->glossy + bsdf_eval->transmission + bsdf_eval->transparent)*inverse_pdf;
*throughput *= sum;
}
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 154add55004..23860b41de3 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -288,7 +288,6 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
throughput /= probability;
-
#ifdef __AO__
/* ambient occlusion */
if(kernel_data.integrator.use_ambient_occlusion) {