diff --git a/modules/voxelman/world/jobs/voxel_terrain_job.cpp b/modules/voxelman/world/jobs/voxel_terrain_job.cpp index a0ecb912b..319016120 100644 --- a/modules/voxelman/world/jobs/voxel_terrain_job.cpp +++ b/modules/voxelman/world/jobs/voxel_terrain_job.cpp @@ -832,14 +832,6 @@ void VoxelTerrainJob::step_type_bake_texture() { VisualServer::get_singleton()->mesh_add_surface_from_arrays(mesh_rid, VisualServer::PRIMITIVE_TRIANGLES, temp_mesh_arr); - Ref lmat; - - if (chunk->material_cache_key_has()) { - lmat = chunk->get_library()->material_cache_get(_chunk->material_cache_key_get())->material_lod_get(_current_mesh); - } else { - lmat = chunk->get_library()->material_lod_get(_current_mesh); - } - if (lmat.is_valid()) { VisualServer::get_singleton()->mesh_surface_set_material(mesh_rid, 0, lmat->get_rid()); }