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:
authorCampbell Barton <campbell@blender.org>2022-05-06 06:43:51 +0300
committerCampbell Barton <campbell@blender.org>2022-05-06 06:43:51 +0300
commit11a7da675f5f984456dc0fd7413b3b87b4a7c8e4 (patch)
tree794d6a1a7b2991e133d7aec2fd0e1a4fc51f0d8a
parente1476ca3101fd9c5f01f4a33020bef708c46d758 (diff)
parente4931ab86dd1bf2918304bbccd0175da394607ef (diff)
Merge branch 'blender-v3.2-release'
-rw-r--r--intern/cycles/kernel/integrator/shade_surface.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h
index f74f715ff70..86c8d1c1f4c 100644
--- a/intern/cycles/kernel/integrator/shade_surface.h
+++ b/intern/cycles/kernel/integrator/shade_surface.h
@@ -387,19 +387,20 @@ ccl_device_forceinline int integrate_surface_volume_only_bounce(IntegratorState
}
#endif
-ccl_device_forceinline bool integrate_surface_terminate(IntegratorState state, const uint32_t path_flag)
+ccl_device_forceinline bool integrate_surface_terminate(IntegratorState state,
+ const uint32_t path_flag)
{
- const float probability = (path_flag & PATH_RAY_TERMINATE_ON_NEXT_SURFACE) ?
- 0.0f :
- INTEGRATOR_STATE(state, path, continuation_probability);
- if (probability == 0.0f) {
- return true;
- }
- else if (probability != 1.0f) {
- INTEGRATOR_STATE_WRITE(state, path, throughput) /= probability;
- }
+ const float probability = (path_flag & PATH_RAY_TERMINATE_ON_NEXT_SURFACE) ?
+ 0.0f :
+ INTEGRATOR_STATE(state, path, continuation_probability);
+ if (probability == 0.0f) {
+ return true;
+ }
+ else if (probability != 1.0f) {
+ INTEGRATOR_STATE_WRITE(state, path, throughput) /= probability;
+ }
- return false;
+ return false;
}
#if defined(__AO__)
@@ -558,7 +559,7 @@ ccl_device bool integrate_surface(KernelGlobals kg,
*
* Also ensure we don't do it twice for SSS at both the entry and exit point. */
if (!(path_flag & PATH_RAY_SUBSURFACE) && integrate_surface_terminate(state, path_flag)) {
- return false;
+ return false;
}
#ifdef __DENOISING_FEATURES__
@@ -583,7 +584,7 @@ ccl_device bool integrate_surface(KernelGlobals kg,
}
else {
if (integrate_surface_terminate(state, path_flag)) {
- return false;
+ return false;
}
PROFILING_EVENT(PROFILING_SHADE_SURFACE_INDIRECT_LIGHT);