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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-11-28 17:43:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-28 18:07:34 +0300
commitf5d1551b6e29eebf0c9e1f0884e0b0571d358e34 (patch)
tree4132b899a7b8d2c4e543b9f1e0631fdcf3aaa4a4 /intern/cycles/kernel/kernel_path.h
parent1e43f0d74216cc936e6a708be321ba2c05b66ca1 (diff)
Cycles: Fix wrong original ray used for SSS baking
Also de-duplicated some code by moving to an utility function.
Diffstat (limited to 'intern/cycles/kernel/kernel_path.h')
-rw-r--r--intern/cycles/kernel/kernel_path.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 721e0fc32d5..baffdb50e8e 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -522,6 +522,13 @@ ccl_device bool kernel_path_subsurface_scatter(
return false;
}
+ccl_device_inline void kernel_path_subsurface_init_indirect(
+ SubsurfaceIndirectRays *ss_indirect)
+{
+ ss_indirect->tracing = false;
+ ss_indirect->num_rays = 0;
+}
+
ccl_device void kernel_path_subsurface_accum_indirect(
SubsurfaceIndirectRays *ss_indirect,
PathRadiance *L)
@@ -598,8 +605,7 @@ ccl_device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample,
#ifdef __SUBSURFACE__
SubsurfaceIndirectRays ss_indirect;
- ss_indirect.tracing = false;
- ss_indirect.num_rays = 0;
+ kernel_path_subsurface_init_indirect(&ss_indirect);
/* TODO(sergey): Avoid having explicit copy of the pre-subsurface scatter
* ray by storing an updated version of state in the ss_indirect which will