TerraPropJob will now make use of the prop material cache.

This commit is contained in:
Relintai 2021-08-08 14:02:36 +02:00
parent 8ec411e80c
commit 2cbb13ea58

View File

@ -297,6 +297,19 @@ void TerraPropJob::phase_setup() {
//Let's just wait //Let's just wait
OS::get_singleton()->delay_usec(100); OS::get_singleton()->delay_usec(100);
} }
#if MESH_DATA_RESOURCE_PRESENT
for (int i = 0; i < _chunk->mesh_data_resource_get_count(); ++i) {
Ref<Texture> tex = _chunk->mesh_data_resource_get_texture(i);
if (!tex.is_valid())
continue;
Rect2 r = cache->additional_texture_get_uv_rect(tex);
_chunk->mesh_data_resource_set_uv_rect(i, r);
}
#endif
} }
next_phase(); next_phase();