From 4f6b0aa04d75b45837015e1dab58951dd03118bf Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sun, 22 Jun 2025 17:42:32 +1000 Subject: [PATCH] use textureLod --- src/main/resources/assets/voxy/shaders/lod/gl46/quads.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/voxy/shaders/lod/gl46/quads.frag b/src/main/resources/assets/voxy/shaders/lod/gl46/quads.frag index b9461868..26656465 100644 --- a/src/main/resources/assets/voxy/shaders/lod/gl46/quads.frag +++ b/src/main/resources/assets/voxy/shaders/lod/gl46/quads.frag @@ -70,7 +70,7 @@ void main() { vec2 dy = dFdy(uvSmol);//vec2(lDy, dDy); colour = textureGrad(blockModelAtlas, texPos, dx, dy); } else { - colour = texture(blockModelAtlas, texPos, -5.0); + colour = textureLod(blockModelAtlas, texPos, 0); } if (any(notEqual(clamp(tile, vec2(0), vec2((interData.x>>8)&0xFu, (interData.x>>12)&0xFu)), tile))) { @@ -84,7 +84,7 @@ void main() { //Also, small quad is really fking over the mipping level somehow - if (useCutout() && (texture(blockModelAtlas, texPos, -16.0).a <= 0.1f)) { + if (useCutout() && (textureLod(blockModelAtlas, texPos, 0).a <= 0.1f)) { //This is stupidly stupidly bad for divergence //TODO: FIXME, basicly what this do is sample the exact pixel (no lod) for discarding, this stops mipmapping fucking it over #ifndef DEBUG_RENDER