Fix: EEVEE: VDB renders as bounding box when using Volume Scatter
Use the same approach as Cycles and only render the volume objects if the shader is using any attribute. Fix #124061
This commit is contained in:
@@ -371,6 +371,13 @@ void SyncModule::sync_volume(Object *ob,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Do not render the object if there is no attribute used in the volume.
|
||||
* This mimic Cycles behavior (see #124061). */
|
||||
ListBase attr_list = GPU_material_attributes(material.volume_material.gpumat);
|
||||
if (BLI_listbase_is_empty(&attr_list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto drawcall_add = [&](MaterialPass &matpass, gpu::Batch *geom, ResourceHandle res_handle) {
|
||||
if (matpass.sub_pass == nullptr) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user