[Bf-blender-cvs] [e83df74008b] blender-v3.0-release: Fix T93890: Cycles error with shadow catcher + OptiX denoise without passes
Brecht Van Lommel
noreply at git.blender.org
Tue Jan 11 09:00:06 CET 2022
Commit: e83df74008b0a99e8888b931dd3e21167071c14e
Author: Brecht Van Lommel
Date: Thu Dec 9 18:01:26 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rBe83df74008b0a99e8888b931dd3e21167071c14e
Fix T93890: Cycles error with shadow catcher + OptiX denoise without passes
===================================================================
M intern/cycles/device/optix/device_impl.cpp
===================================================================
diff --git a/intern/cycles/device/optix/device_impl.cpp b/intern/cycles/device/optix/device_impl.cpp
index 6e897e3831f..f230f865f60 100644
--- a/intern/cycles/device/optix/device_impl.cpp
+++ b/intern/cycles/device/optix/device_impl.cpp
@@ -522,9 +522,9 @@ class OptiXDevice::DenoiseContext {
}
}
- const int num_guiding_passes = num_input_passes - 1;
+ use_guiding_passes = (num_input_passes - 1) > 0;
- if (num_guiding_passes) {
+ if (use_guiding_passes) {
if (task.allow_inplace_modification) {
guiding_params.device_pointer = render_buffers->buffer.device_pointer;
@@ -577,6 +577,7 @@ class OptiXDevice::DenoiseContext {
/* Number of input passes. Including the color and extra auxiliary passes. */
int num_input_passes = 0;
+ bool use_guiding_passes = false;
bool use_pass_albedo = false;
bool use_pass_normal = false;
@@ -708,7 +709,7 @@ void OptiXDevice::denoise_pass(DenoiseContext &context, PassType pass_type)
return;
}
}
- else if (!context.albedo_replaced_with_fake) {
+ else if (context.use_guiding_passes && !context.albedo_replaced_with_fake) {
context.albedo_replaced_with_fake = true;
if (!denoise_filter_guiding_set_fake_albedo(context)) {
LOG(ERROR) << "Error replacing real albedo with the fake one.";
More information about the Bf-blender-cvs
mailing list