diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_camera.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/blender/blender_viewport.cpp | 16 | ||||
-rw-r--r-- | intern/cycles/blender/blender_viewport.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/kernel_passes.h | 4 | ||||
-rw-r--r-- | intern/cycles/render/buffers.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/render/film.cpp | 2 |
7 files changed, 9 insertions, 24 deletions
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp index 3b19e78894a..c84d6e1572b 100644 --- a/intern/cycles/blender/blender_camera.cpp +++ b/intern/cycles/blender/blender_camera.cpp @@ -899,7 +899,7 @@ BufferParams BlenderSync::get_buffer_params(BL::RenderSettings &b_render, params.height = height; } - update_viewport_display_passes(b_v3d, params.passes, false); + update_viewport_display_passes(b_v3d, params.passes); return params; } diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 1a166d171bc..f04455ff75e 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -344,7 +344,7 @@ void BlenderSync::sync_film(BL::SpaceView3D &b_v3d) Film prevfilm = *film; if (b_v3d) { - film->display_pass = update_viewport_display_passes(b_v3d, film->passes, true); + film->display_pass = update_viewport_display_passes(b_v3d, film->passes); } film->exposure = get_float(cscene, "film_exposure"); @@ -520,7 +520,6 @@ int BlenderSync::get_denoising_pass(BL::RenderPass &b_pass) vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer &b_rlay, BL::ViewLayer &b_view_layer) { vector<Pass> passes; - Pass::add(PASS_COMBINED, passes); /* loop over passes */ BL::RenderLayer::passes_iterator b_pass_iter; diff --git a/intern/cycles/blender/blender_viewport.cpp b/intern/cycles/blender/blender_viewport.cpp index a74b20f150b..73ef5f94720 100644 --- a/intern/cycles/blender/blender_viewport.cpp +++ b/intern/cycles/blender/blender_viewport.cpp @@ -72,23 +72,13 @@ PassType BlenderViewportParameters::get_viewport_display_render_pass(BL::SpaceVi return display_pass; } -PassType update_viewport_display_passes(BL::SpaceView3D &b_v3d, - vector<Pass> &passes, - bool reset_passes) +PassType update_viewport_display_passes(BL::SpaceView3D &b_v3d, vector<Pass> &passes) { if (b_v3d) { PassType display_pass = BlenderViewportParameters::get_viewport_display_render_pass(b_v3d); - if (reset_passes) { - passes.clear(); - /* We always need a combined pass for now. It would be a good optimization - * to support rendering without combined pass. */ - Pass::add(PASS_COMBINED, passes); - } - - if (display_pass != PASS_COMBINED) { - Pass::add(display_pass, passes); - } + passes.clear(); + Pass::add(display_pass, passes); return display_pass; } diff --git a/intern/cycles/blender/blender_viewport.h b/intern/cycles/blender/blender_viewport.h index 564c4f2b210..f26d0d38115 100644 --- a/intern/cycles/blender/blender_viewport.h +++ b/intern/cycles/blender/blender_viewport.h @@ -49,9 +49,7 @@ class BlenderViewportParameters { static PassType get_viewport_display_render_pass(BL::SpaceView3D &b_v3d); }; -PassType update_viewport_display_passes(BL::SpaceView3D &b_v3d, - vector<Pass> &passes, - bool reset_passes); +PassType update_viewport_display_passes(BL::SpaceView3D &b_v3d, vector<Pass> &passes); CCL_NAMESPACE_END diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index 4a424866efe..c1d74dddc2a 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -397,7 +397,9 @@ ccl_device_inline void kernel_write_result(KernelGlobals *kg, float alpha; float3 L_sum = path_radiance_clamp_and_sum(kg, L, &alpha); - kernel_write_pass_float4(buffer, make_float4(L_sum.x, L_sum.y, L_sum.z, alpha)); + if (kernel_data.film.pass_flag & PASSMASK(COMBINED)) { + kernel_write_pass_float4(buffer, make_float4(L_sum.x, L_sum.y, L_sum.z, alpha)); + } kernel_write_light_passes(kg, buffer, L); diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index ad3827df7e3..49e15d9eaf1 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -43,8 +43,6 @@ BufferParams::BufferParams() denoising_data_pass = false; denoising_clean_pass = false; denoising_prefiltered_pass = false; - - Pass::add(PASS_COMBINED, passes); } void BufferParams::get_offset_stride(int &offset, int &stride) diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp index 5bf7ba97515..7f5bec2a66e 100644 --- a/intern/cycles/render/film.cpp +++ b/intern/cycles/render/film.cpp @@ -293,8 +293,6 @@ NODE_DEFINE(Film) Film::Film() : Node(node_type) { - Pass::add(PASS_COMBINED, passes); - use_light_visibility = false; filter_table_offset = TABLE_OFFSET_INVALID; cryptomatte_passes = CRYPT_NONE; |