diff --git a/world/blocky/voxel_world_blocky.cpp b/world/blocky/voxel_world_blocky.cpp index c7b2d65..af12dd6 100644 --- a/world/blocky/voxel_world_blocky.cpp +++ b/world/blocky/voxel_world_blocky.cpp @@ -76,6 +76,28 @@ Ref VoxelWorldBlocky::_create_chunk(int x, int y, int z, Refset_prop_mesher(Ref(memnew(VoxelMesherBlocky))); + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); +#ifdef MESH_UTILS_PRESENT + Ref fqms; + fqms.instance(); + s->set_fqms(fqms); + s->set_simplification_steps(2); +#endif + pj->add_jobs_step(s); + chunk->job_add(lj); chunk->job_add(tj); chunk->job_add(pj); diff --git a/world/cubic/voxel_world_cubic.cpp b/world/cubic/voxel_world_cubic.cpp index 149f654..ee12bc1 100644 --- a/world/cubic/voxel_world_cubic.cpp +++ b/world/cubic/voxel_world_cubic.cpp @@ -77,6 +77,28 @@ Ref VoxelWorldCubic::_create_chunk(int x, int y, int z, Refset_prop_mesher(Ref(memnew(VoxelMesherCubic))); + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); +#ifdef MESH_UTILS_PRESENT + Ref fqms; + fqms.instance(); + s->set_fqms(fqms); + s->set_simplification_steps(2); +#endif + pj->add_jobs_step(s); + chunk->job_add(lj); chunk->job_add(tj); chunk->job_add(pj); diff --git a/world/default/voxel_world_default.cpp b/world/default/voxel_world_default.cpp index afd46b9..be69f68 100644 --- a/world/default/voxel_world_default.cpp +++ b/world/default/voxel_world_default.cpp @@ -221,6 +221,28 @@ Ref VoxelWorldDefault::_create_chunk(int x, int y, int z, Refset_prop_mesher(Ref(memnew(VoxelMesherDefault))); + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); +#ifdef MESH_UTILS_PRESENT + Ref fqms; + fqms.instance(); + s->set_fqms(fqms); + s->set_simplification_steps(2); +#endif + pj->add_jobs_step(s); + // Order matters! chunk->job_add(lj); chunk->job_add(tj); diff --git a/world/marching_cubes/voxel_world_marching_cubes.cpp b/world/marching_cubes/voxel_world_marching_cubes.cpp index b949603..35a98bc 100644 --- a/world/marching_cubes/voxel_world_marching_cubes.cpp +++ b/world/marching_cubes/voxel_world_marching_cubes.cpp @@ -78,6 +78,28 @@ Ref VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref< pj.INSTANCE(); pj->set_prop_mesher(Ref(memnew(VoxelMesherMarchingCubes))); + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_NORMAL); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_MERGE_VERTS); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_BAKE_TEXTURE); + pj->add_jobs_step(s); + + s.instance(); + s->set_job_type(VoxelMesherJobStep::TYPE_SIMPLIFY_MESH); +#ifdef MESH_UTILS_PRESENT + Ref fqms; + fqms.instance(); + s->set_fqms(fqms); + s->set_simplification_steps(2); +#endif + pj->add_jobs_step(s); + chunk->job_add(lj); chunk->job_add(tj); chunk->job_add(pj);