From 8f1d89cb95f77bd50c4bd8f2fc7f14d1a1572908 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sun, 2 Feb 2025 01:26:47 +1000 Subject: [PATCH] debug util --- .../client/core/model/ModelTextureBakery.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/cortex/voxy/client/core/model/ModelTextureBakery.java b/src/main/java/me/cortex/voxy/client/core/model/ModelTextureBakery.java index b5579a5a..38f2d7a7 100644 --- a/src/main/java/me/cortex/voxy/client/core/model/ModelTextureBakery.java +++ b/src/main/java/me/cortex/voxy/client/core/model/ModelTextureBakery.java @@ -32,8 +32,7 @@ import org.lwjgl.opengl.GL11C; import java.util.ArrayList; import java.util.List; -import static org.lwjgl.opengl.ARBDirectStateAccess.glGetTextureImage; -import static org.lwjgl.opengl.ARBDirectStateAccess.glTextureParameteri; +import static org.lwjgl.opengl.ARBDirectStateAccess.*; import static org.lwjgl.opengl.ARBShaderImageLoadStore.GL_FRAMEBUFFER_BARRIER_BIT; import static org.lwjgl.opengl.ARBShaderImageLoadStore.glMemoryBarrier; import static org.lwjgl.opengl.GL11C.GL_TEXTURE_2D; @@ -192,6 +191,11 @@ public class ModelTextureBakery { for (int i = 0; i < FACE_VIEWS.size(); i++) { int faceOffset = streamBaseOffset + TEXTURE_SIZE*i*2; captureViewToStream(state, model, entityModel, FACE_VIEWS.get(i), randomValue, i, renderFluid, texId, projection, streamBuffer, faceOffset); + int SIZE = 128; + int x = (i%3)*SIZE; + int y = (i/3)*SIZE; + //glBlitNamedFramebuffer(this.framebuffer.id, oldFB, 0,0,16,16,x,y,x+SIZE,y+SIZE, GL_COLOR_BUFFER_BIT, GL_NEAREST); + } renderLayer.endDrawing(); @@ -324,6 +328,14 @@ public class ModelTextureBakery { glUniform1ui(4, streamOffset/4); glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); + glDispatchCompute(1,1,1); } private static void renderQuads(BufferBuilder builder, BlockState state, BakedModel model, MatrixStack stack, long randomValue) {