Fix: EEVEE: Object wihtout volume probe visibility don't cast shadow
Object without lightprobe visibility should still cast shadows during baking. They should only not bounce indirect lighting. This is more visible now that shadow linking is supported. Fix #128812
This commit is contained in:
@@ -311,11 +311,6 @@ void Instance::object_sync_render(void *instance_,
|
||||
{
|
||||
UNUSED_VARS(engine, depsgraph);
|
||||
Instance &inst = *reinterpret_cast<Instance *>(instance_);
|
||||
|
||||
if (inst.is_baking() && ob->visibility_flag & OB_HIDE_PROBE_VOLUME) {
|
||||
return;
|
||||
}
|
||||
|
||||
inst.object_sync(ob);
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user