Fix textures with the PCM library.

This commit is contained in:
Relintai 2022-02-24 10:32:49 +01:00
parent 4978e6c35f
commit 1e056b03e2

View File

@ -78,7 +78,8 @@ void Terrain2DTerrain2DJob::phase_library_setup() {
if (lib->supports_caching()) { if (lib->supports_caching()) {
if (!_chunk->material_cache_key_has()) { if (!_chunk->material_cache_key_has()) {
lib->material_cache_get_key(_chunk); lib->material_cache_get_key(_chunk);
} else { }
Ref<Terrain2DMaterialCache> cache = lib->material_cache_get(_chunk->material_cache_key_get()); Ref<Terrain2DMaterialCache> cache = lib->material_cache_get(_chunk->material_cache_key_get());
if (!cache.is_valid()) { if (!cache.is_valid()) {
@ -113,7 +114,7 @@ void Terrain2DTerrain2DJob::phase_library_setup() {
cd->mesh_rid_set(Terrain2DChunkDefault::MESH_INDEX_TERRAIN, Terrain2DChunkDefault::MESH_TYPE_INDEX_TEXTURE_RID, tex->get_rid()); cd->mesh_rid_set(Terrain2DChunkDefault::MESH_INDEX_TERRAIN, Terrain2DChunkDefault::MESH_TYPE_INDEX_TEXTURE_RID, tex->get_rid());
} }
} }
}
} else { } else {
Ref<Terrain2DChunkDefault> cd = _chunk; Ref<Terrain2DChunkDefault> cd = _chunk;