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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-11-04 18:50:53 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-04 18:50:53 +0300
commita72b26527d8be1d11079c55fac2889640990ab9a (patch)
treec27aac8b863d9d96b9384a011d8b6881b4b4c0ef /intern
parent2becb3e9afbe43677a169f68d9da848f79e2f06b (diff)
parentffe115d1a8f625bb5a6b72616fa2f955448869ff (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/integrator/intersect_closest.h1
-rw-r--r--intern/cycles/kernel/integrator/path_state.h1
-rw-r--r--intern/cycles/kernel/integrator/shade_surface.h2
-rw-r--r--intern/cycles/kernel/integrator/shade_volume.h2
-rw-r--r--intern/cycles/kernel/integrator/state_template.h2
5 files changed, 6 insertions, 2 deletions
diff --git a/intern/cycles/kernel/integrator/intersect_closest.h b/intern/cycles/kernel/integrator/intersect_closest.h
index 7fb88fc2804..2cac18ed889 100644
--- a/intern/cycles/kernel/integrator/intersect_closest.h
+++ b/intern/cycles/kernel/integrator/intersect_closest.h
@@ -63,6 +63,7 @@ ccl_device_forceinline bool integrator_intersect_terminate(KernelGlobals kg,
* perform MIS as part of indirect rays. */
const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag);
const float probability = path_state_continuation_probability(kg, state, path_flag);
+ INTEGRATOR_STATE_WRITE(state, path, continuation_probability) = probability;
if (probability != 1.0f) {
const float terminate = path_state_rng_1D(kg, &rng_state, PRNG_TERMINATE);
diff --git a/intern/cycles/kernel/integrator/path_state.h b/intern/cycles/kernel/integrator/path_state.h
index 8311b97dedb..c325d829b5c 100644
--- a/intern/cycles/kernel/integrator/path_state.h
+++ b/intern/cycles/kernel/integrator/path_state.h
@@ -67,6 +67,7 @@ ccl_device_inline void path_state_init_integrator(KernelGlobals kg,
INTEGRATOR_STATE_WRITE(state, path, mis_ray_pdf) = 0.0f;
INTEGRATOR_STATE_WRITE(state, path, mis_ray_t) = 0.0f;
INTEGRATOR_STATE_WRITE(state, path, min_ray_pdf) = FLT_MAX;
+ INTEGRATOR_STATE_WRITE(state, path, continuation_probability) = 1.0f;
INTEGRATOR_STATE_WRITE(state, path, throughput) = make_float3(1.0f, 1.0f, 1.0f);
if (kernel_data.kernel_features & KERNEL_FEATURE_VOLUME) {
diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h
index cce591eb219..d9006e71ce0 100644
--- a/intern/cycles/kernel/integrator/shade_surface.h
+++ b/intern/cycles/kernel/integrator/shade_surface.h
@@ -479,7 +479,7 @@ ccl_device bool integrate_surface(KernelGlobals kg,
if (!(path_flag & PATH_RAY_SUBSURFACE)) {
const float probability = (path_flag & PATH_RAY_TERMINATE_ON_NEXT_SURFACE) ?
0.0f :
- path_state_continuation_probability(kg, state, path_flag);
+ INTEGRATOR_STATE(state, path, continuation_probability);
if (probability == 0.0f) {
return false;
}
diff --git a/intern/cycles/kernel/integrator/shade_volume.h b/intern/cycles/kernel/integrator/shade_volume.h
index f455152dcf9..05959bef220 100644
--- a/intern/cycles/kernel/integrator/shade_volume.h
+++ b/intern/cycles/kernel/integrator/shade_volume.h
@@ -941,7 +941,7 @@ ccl_device VolumeIntegrateEvent volume_integrate(KernelGlobals kg,
const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag);
const float probability = (path_flag & PATH_RAY_TERMINATE_IN_NEXT_VOLUME) ?
0.0f :
- path_state_continuation_probability(kg, state, path_flag);
+ INTEGRATOR_STATE(state, path, continuation_probability);
if (probability == 0.0f) {
return VOLUME_PATH_MISSED;
}
diff --git a/intern/cycles/kernel/integrator/state_template.h b/intern/cycles/kernel/integrator/state_template.h
index e082424fabd..25475883915 100644
--- a/intern/cycles/kernel/integrator/state_template.h
+++ b/intern/cycles/kernel/integrator/state_template.h
@@ -56,6 +56,8 @@ KERNEL_STRUCT_MEMBER(path, float, mis_ray_pdf, KERNEL_FEATURE_PATH_TRACING)
KERNEL_STRUCT_MEMBER(path, float, mis_ray_t, KERNEL_FEATURE_PATH_TRACING)
/* Filter glossy. */
KERNEL_STRUCT_MEMBER(path, float, min_ray_pdf, KERNEL_FEATURE_PATH_TRACING)
+/* Continuation probability for path termination. */
+KERNEL_STRUCT_MEMBER(path, float, continuation_probability, KERNEL_FEATURE_PATH_TRACING)
/* Throughput. */
KERNEL_STRUCT_MEMBER(path, float3, throughput, KERNEL_FEATURE_PATH_TRACING)
/* Ratio of throughput to distinguish diffuse and glossy render passes. */