diff --git a/source/blender/draw/engines/eevee_next/eevee_instance.cc b/source/blender/draw/engines/eevee_next/eevee_instance.cc index 1999230b3a8..2159c6a371f 100644 --- a/source/blender/draw/engines/eevee_next/eevee_instance.cc +++ b/source/blender/draw/engines/eevee_next/eevee_instance.cc @@ -311,11 +311,6 @@ void Instance::object_sync_render(void *instance_, { UNUSED_VARS(engine, depsgraph); Instance &inst = *reinterpret_cast(instance_); - - if (inst.is_baking() && ob->visibility_flag & OB_HIDE_PROBE_VOLUME) { - return; - } - inst.object_sync(ob); } diff --git a/source/blender/draw/engines/eevee_next/eevee_material.cc b/source/blender/draw/engines/eevee_next/eevee_material.cc index b2fd61767fb..9f037cef6c4 100644 --- a/source/blender/draw/engines/eevee_next/eevee_material.cc +++ b/source/blender/draw/engines/eevee_next/eevee_material.cc @@ -303,11 +303,16 @@ Material &MaterialModule::material_sync(Object *ob, Material &mat = material_map_.lookup_or_add_cb(material_key, [&]() { Material mat; if (inst_.is_baking()) { + if (ob->visibility_flag & OB_HIDE_PROBE_VOLUME) { + mat.capture = MaterialPass(); + } + else { + mat.capture = material_pass_get(ob, blender_mat, MAT_PIPE_CAPTURE, geometry_type); + } mat.prepass = MaterialPass(); /* TODO(fclem): Still need the shading pass for correct attribute extraction. Would be better * to avoid this shader compilation in another context. */ mat.shading = material_pass_get(ob, blender_mat, surface_pipe, geometry_type); - mat.capture = material_pass_get(ob, blender_mat, MAT_PIPE_CAPTURE, geometry_type); mat.overlap_masking = MaterialPass(); mat.lightprobe_sphere_prepass = MaterialPass(); mat.lightprobe_sphere_shading = MaterialPass();