Fix wrong condition

This commit is contained in:
Marc Gilleron 2022-08-17 22:20:05 +01:00
parent b9d60070d7
commit f6d35ad97e

View File

@ -313,7 +313,7 @@ void MeshBlockTask::run(zylann::ThreadedTaskContext ctx) {
// terrain. // terrain.
Ref<VoxelMesherTransvoxel> transvoxel_mesher = mesher; Ref<VoxelMesherTransvoxel> transvoxel_mesher = mesher;
if (mesher.is_valid() && virtual_texture_settings.enabled && !mesh_is_empty && if (transvoxel_mesher.is_valid() && virtual_texture_settings.enabled && !mesh_is_empty &&
lod_index >= virtual_texture_settings.begin_lod_index && require_virtual_texture) { lod_index >= virtual_texture_settings.begin_lod_index && require_virtual_texture) {
ZN_PROFILE_SCOPE_NAMED("Schedule virtual render"); ZN_PROFILE_SCOPE_NAMED("Schedule virtual render");