Fixed other issues?

This commit is contained in:
mcrcortex
2024-09-24 00:19:25 +10:00
parent f53a81099e
commit 00cf0c73e3
3 changed files with 6 additions and 8 deletions

View File

@@ -77,17 +77,17 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
world.getMapper().setBiomeCallback(this.modelService::addBiome); world.getMapper().setBiomeCallback(this.modelService::addBiome);
//this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(0, 0,0,0)); //this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(0, 0,0,0));
this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, 0,0,0)); //this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, 0,0,0));
/*
final int H_WIDTH = 10; final int H_WIDTH = 10;
for (int x = -H_WIDTH; x <= H_WIDTH; x++) { for (int x = -H_WIDTH; x <= H_WIDTH; x++) {
for (int y = 0; y <= 0; y++) { for (int y = -1; y <= 0; y++) {
for (int z = -H_WIDTH; z <= H_WIDTH; z++) { for (int z = -H_WIDTH; z <= H_WIDTH; z++) {
this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, x, y, z)); this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, x, y, z));
} }
} }
}*/ }
} }
public void setup(Camera camera) { public void setup(Camera camera) {

View File

@@ -48,7 +48,7 @@ public final class NodeStore {
if (id < 0) { if (id < 0) {
throw new IllegalStateException("Failed to allocate " + count + " consecutive nodes!!"); throw new IllegalStateException("Failed to allocate " + count + " consecutive nodes!!");
} }
this.ensureSized(id + (count-1)); this.ensureSized(id + count);
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
this.clear(id + i); this.clear(id + i);
} }

View File

@@ -121,16 +121,14 @@ public class PostProcessing {
glDepthMask(false); glDepthMask(false);
glColorMask(false,false,false,false); glColorMask(false,false,false,false);
this.emptyBlit.blit(); this.emptyBlit.blit();
glColorMask(true,true,true,true);
glDepthMask(true); glDepthMask(true);
//glDisable(GL_DEPTH_TEST);
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
//Set depth to 0 w.r.t mask //Set depth to 0 w.r.t mask
glStencilFunc(GL_EQUAL, 0, 0xFF); glStencilFunc(GL_EQUAL, 0, 0xFF);
this.setDepth0.blit(); this.setDepth0.blit();
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glColorMask(true,true,true,true);
//Make voxy terrain render only where there isnt mc terrain //Make voxy terrain render only where there isnt mc terrain
glStencilFunc(GL_EQUAL, 1, 0xFF); glStencilFunc(GL_EQUAL, 1, 0xFF);