mirror of
https://github.com/Relintai/terraman.git
synced 2025-04-25 21:45:00 +02:00
TerraPropJob will now make use of the prop material cache.
This commit is contained in:
parent
8ec411e80c
commit
2cbb13ea58
@ -297,6 +297,19 @@ void TerraPropJob::phase_setup() {
|
||||
//Let's just wait
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user