mirror of
https://github.com/Relintai/voxelman.git
synced 2024-11-20 10:47:19 +01:00
Add the new prop job setup to all 4 (3) VoxelWorlds.
This commit is contained in:
parent
08be795296
commit
9ee54a48c4
@ -76,6 +76,28 @@ Ref<VoxelChunk> VoxelWorldBlocky::_create_chunk(int x, int y, int z, Ref<VoxelCh
|
||||
pj.INSTANCE();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(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<FastQuadraticMeshSimplifier> 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);
|
||||
|
@ -77,6 +77,28 @@ Ref<VoxelChunk> VoxelWorldCubic::_create_chunk(int x, int y, int z, Ref<VoxelChu
|
||||
pj.INSTANCE();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(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<FastQuadraticMeshSimplifier> 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);
|
||||
|
@ -221,6 +221,28 @@ Ref<VoxelChunk> VoxelWorldDefault::_create_chunk(int x, int y, int z, Ref<VoxelC
|
||||
pj.instance();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(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<FastQuadraticMeshSimplifier> 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);
|
||||
|
@ -78,6 +78,28 @@ Ref<VoxelChunk> VoxelWorldMarchingCubes::_create_chunk(int x, int y, int z, Ref<
|
||||
pj.INSTANCE();
|
||||
pj->set_prop_mesher(Ref<VoxelMesher>(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<FastQuadraticMeshSimplifier> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user