diff --git a/world/jobs/terra_terrarin_job.cpp b/world/jobs/terra_terrarin_job.cpp index 940805e..18b78f2 100644 --- a/world/jobs/terra_terrarin_job.cpp +++ b/world/jobs/terra_terrarin_job.cpp @@ -100,20 +100,8 @@ void TerraTerrarinJob::phase_library_setup() { if (lib->supports_caching()) { lib->material_cache_get_key(_chunk); - - //if (_liquid_mesher.is_valid()) { - // _liquid_mesher->set_terrain_material_key(_terrarin_material_key); - //} } - //if (lib->supports_caching()) { - // _terrain_material_key = lib->material_cached_get_key(_chunk); - - //if (_liquid_mesher.is_valid()) { - // _liquid_mesher->set_terrain_material_key(_terrarin_material_key); - //} - //} - next_phase(); } @@ -479,7 +467,7 @@ void TerraTerrarinJob::step_type_normal() { Ref lmat; - if (chunk->get_library()->supports_caching()) { + 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); @@ -520,7 +508,7 @@ void TerraTerrarinJob::step_type_normal_lod() { Ref lmat; - if (chunk->get_library()->supports_caching()) { + 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); @@ -544,7 +532,7 @@ void TerraTerrarinJob::step_type_drop_uv2() { Ref lmat; - if (chunk->get_library()->supports_caching()) { + 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); @@ -568,7 +556,7 @@ void TerraTerrarinJob::step_type_merge_verts() { Ref lmat; - if (chunk->get_library()->supports_caching()) { + 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); @@ -604,7 +592,7 @@ void TerraTerrarinJob::step_type_bake_texture() { Ref lmat; - if (chunk->get_library()->supports_caching()) { + 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); @@ -639,7 +627,7 @@ void TerraTerrarinJob::step_type_simplify_mesh() { Ref lmat; - if (chunk->get_library()->supports_caching()) { + 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);