From f9d1d9961b5bf2dc33778ed8ce033be3b9870104 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Wed, 28 May 2025 12:11:42 +1000 Subject: [PATCH] Attempt to fix some woopsies --- .../client/core/rendering/section/MDICSectionRenderer.java | 4 ++-- .../assets/voxy/shaders/lod/gl46/buildtranslucents.comp | 4 ++-- src/main/resources/assets/voxy/shaders/lod/gl46/cmdgen.comp | 3 ++- .../resources/assets/voxy/shaders/util/prefixsum/inital3.comp | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/section/MDICSectionRenderer.java b/src/main/java/me/cortex/voxy/client/core/rendering/section/MDICSectionRenderer.java index 68a76b7b..c878c7a1 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/section/MDICSectionRenderer.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/section/MDICSectionRenderer.java @@ -80,10 +80,10 @@ public class MDICSectionRenderer extends AbstractSectionRenderer>detail)); uint dist = (rel.x+rel.y+rel.z)<1023) + dist = (TRANSLUCENT_WRITE_BASE-1)-min(dist, (TRANSLUCENT_WRITE_BASE-1)); uint drawPtr = atomicAdd(translucentCommandData[dist],1)+TRANSLUCENT_OFFSET; writeCmd(drawPtr, drawId, extractQuadStart(meta), meta.cntA&0xFFFF); diff --git a/src/main/resources/assets/voxy/shaders/lod/gl46/cmdgen.comp b/src/main/resources/assets/voxy/shaders/lod/gl46/cmdgen.comp index ca25a803..e049123f 100644 --- a/src/main/resources/assets/voxy/shaders/lod/gl46/cmdgen.comp +++ b/src/main/resources/assets/voxy/shaders/lod/gl46/cmdgen.comp @@ -113,7 +113,8 @@ void main() { translucentCommandData[tp] = drawId; uvec3 absRel = abs(relative); uint distToCamera = (absRel.x+absRel.y+absRel.z)<1023) + distToCamera = (TRANSLUCENT_WRITE_BASE-1)-min(distToCamera, (TRANSLUCENT_WRITE_BASE-1)); atomicAdd(translucentCommandData[distToCamera], 1); #ifdef HAS_STATISTICS totalQuads += count; diff --git a/src/main/resources/assets/voxy/shaders/util/prefixsum/inital3.comp b/src/main/resources/assets/voxy/shaders/util/prefixsum/inital3.comp index eedd234b..6d0a8fa1 100644 --- a/src/main/resources/assets/voxy/shaders/util/prefixsum/inital3.comp +++ b/src/main/resources/assets/voxy/shaders/util/prefixsum/inital3.comp @@ -87,7 +87,7 @@ void main() { memoryBarrierShared(); barrier(); - if (gl_SubgroupID == 0) { + if (subgroupId == 0) { uint val = warpPrefixSum[gl_SubgroupInvocationID]; subgroupBarrier(); //Use warp to do entire add in 1 reduction