diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/RenderService.java b/src/main/java/me/cortex/voxy/client/core/rendering/RenderService.java index 68e8081b..6af7059c 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/RenderService.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/RenderService.java @@ -77,17 +77,17 @@ public class RenderService, J extends Vi world.getMapper().setBiomeCallback(this.modelService::addBiome); //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; 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++) { this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, x, y, z)); } } - }*/ + } } public void setup(Camera camera) { diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/hierachical2/NodeStore.java b/src/main/java/me/cortex/voxy/client/core/rendering/hierachical2/NodeStore.java index 65a326c5..2ae79559 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/hierachical2/NodeStore.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/hierachical2/NodeStore.java @@ -48,7 +48,7 @@ public final class NodeStore { if (id < 0) { 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++) { this.clear(id + i); } diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java b/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java index 91b92248..0b150799 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java @@ -121,16 +121,14 @@ public class PostProcessing { glDepthMask(false); glColorMask(false,false,false,false); this.emptyBlit.blit(); - glColorMask(true,true,true,true); glDepthMask(true); - //glDisable(GL_DEPTH_TEST); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); //Set depth to 0 w.r.t mask glStencilFunc(GL_EQUAL, 0, 0xFF); this.setDepth0.blit(); glDisable(GL_DEPTH_TEST); + glColorMask(true,true,true,true); //Make voxy terrain render only where there isnt mc terrain glStencilFunc(GL_EQUAL, 1, 0xFF);