From 8462dde3749cd66ff9286fe82e17ceb88fa8af93 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Tue, 3 Jun 2025 00:08:01 +1000 Subject: [PATCH] use provoking vertex --- .../core/rendering/section/MDICSectionRenderer.java | 2 ++ .../assets/voxy/shaders/lod/gl46/quads2.vert | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 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 c878c7a1..1c1a6f7d 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 @@ -136,6 +136,7 @@ public class MDICSectionRenderer extends AbstractSectionRenderer>8)&0xFFu)*(1.0/(256.0)); - baseUV = modelUV + (vec2(face>>1, face&1u) * (1.0/(vec2(3.0, 2.0)*256.0))); - ivec2 quadSize = extractSize(quad); - { //Generate tinting and flag data + + + if (cornerIdx == 1) //Only if we are the provoking vertex + { + vec2 modelUV = vec2(modelId&0xFFu, (modelId>>8)&0xFFu)*(1.0/(256.0)); + baseUV = modelUV + (vec2(face>>1, face&1u) * (1.0/(vec2(3.0, 2.0)*256.0))); + + //Generate tinting and flag data flags = faceHasAlphaCuttout(faceData); //We need to have a conditional override based on if the model size is < a full face + quadSize > 1