Workbench: Fix compiler warnings

This commit is contained in:
Clément Foucault
2023-05-17 11:52:49 +02:00
parent bafd82c9c1
commit 39644e7f71
2 changed files with 2 additions and 2 deletions

View File

@@ -102,6 +102,7 @@ class Instance {
if (::Material *_mat = BKE_object_material_get_eval(ob_ref.object, slot + 1)) {
return Material(*_mat);
}
ATTR_FALLTHROUGH;
default:
return Material(*BKE_material_default_empty());
}

View File

@@ -66,9 +66,8 @@ void VolumePass::object_sync_volume(Manager &manager,
manager, sub_ps, ob_ref, volume->display.slice_axis, volume->display.slice_depth);
}
else {
float3 world_size;
float4x4 texture_to_world = float4x4(ob->object_to_world) * float4x4(grid->texture_to_object);
math::normalize_and_get_size(float3x3(texture_to_world), world_size);
float3 world_size = math::to_scale(texture_to_world);
int3 resolution;
GPU_texture_get_mipmap_size(grid->texture, 0, resolution);