This commit is contained in:
mcrcortex
2024-09-23 10:03:09 +10:00
parent ad7660e4d6
commit 27ed49fcd9
2 changed files with 7 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
//Max sections: ~500k
//Max geometry: 1 gb
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<19, (1L<<30)-1024);
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<19, (1L<<31)-1024);
//Do something incredibly hacky, we dont need to keep the reference to this around, so just connect and discard
var router = new SectionUpdateRouter();
@@ -79,9 +79,9 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
//this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(0, 0,0,0));
//this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, 0,0,0));
final int H_WIDTH = 1;
final int H_WIDTH = 10;
for (int x = -H_WIDTH; x <= H_WIDTH; x++) {
for (int y = -1; y <= 0; y++) {
for (int y = 0; y <= 0; y++) {
for (int z = -H_WIDTH; z <= H_WIDTH; z++) {
this.nodeManager.insertTopLevelNode(WorldEngine.getWorldSectionId(4, x, y, z));
}
@@ -104,7 +104,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
// the section renderer is as it might have different backends, but they all accept a buffer containing the section list
//this.sectionRenderer.renderOpaque(viewport);
this.sectionRenderer.renderOpaque(viewport);
//NOTE: need to do the upload and download tick here, after the section renderer renders the world, to ensure "stable"

View File

@@ -38,8 +38,8 @@ public class HierarchicalOcclusionTraverser {
private final GlBuffer renderList = new GlBuffer(100_000 * 4 + 4).zero();//100k sections max to render, TODO: Maybe move to render service or somewhere else
private final GlBuffer queueMetaBuffer = new GlBuffer(4*4*5).zero();
private final GlBuffer scratchQueueA = new GlBuffer(10_000*4).zero();
private final GlBuffer scratchQueueB = new GlBuffer(10_000*4).zero();
private final GlBuffer scratchQueueA = new GlBuffer(20_000*4).zero();
private final GlBuffer scratchQueueB = new GlBuffer(20_000*4).zero();
private static final int LOCAL_WORK_SIZE_BITS = 5;
private static final int MAX_ITERATIONS = 5;
@@ -116,7 +116,7 @@ public class HierarchicalOcclusionTraverser {
MemoryUtil.memPutInt(ptr, (int) (this.renderList.size()/4-1)); ptr += 4;
//Screen space size for descending
MemoryUtil.memPutFloat(ptr, 64*64); ptr += 4;
MemoryUtil.memPutFloat(ptr, 128*128); ptr += 4;
}
private void bindings() {