[Bf-blender-cvs] [30b03da6575] cycles-x: Fix possible nan pixels in Cycels X pass accessor

Sergey Sharybin noreply at git.blender.org
Tue Sep 7 12:53:19 CEST 2021


Commit: 30b03da6575ca911c5711cf1b11fc705b7447c94
Author: Sergey Sharybin
Date:   Tue Sep 7 12:52:50 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB30b03da6575ca911c5711cf1b11fc705b7447c94

Fix possible nan pixels in Cycels X pass accessor

===================================================================

M	intern/cycles/integrator/pass_accessor.cpp

===================================================================

diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp
index e07b76403ee..2f057ddc663 100644
--- a/intern/cycles/integrator/pass_accessor.cpp
+++ b/intern/cycles/integrator/pass_accessor.cpp
@@ -271,7 +271,7 @@ void PassAccessor::init_kernel_film_convert(KernelFilmConvert *kfilm_convert,
   kfilm_convert->pass_background = buffer_params.get_pass_offset(PASS_BACKGROUND);
 
   if (pass_info.use_filter) {
-    kfilm_convert->scale = 1.0f / num_samples_;
+    kfilm_convert->scale = num_samples_ != 0 ? 1.0f / num_samples_ : 0.0f;
   }
   else {
     kfilm_convert->scale = 1.0f;



More information about the Bf-blender-cvs mailing list