From 59ac889ff9d557c67a81d59421afdf331ff6f349 Mon Sep 17 00:00:00 2001 From: Azusa_Ke Date: Mon, 20 Jul 2026 20:24:33 +0800 Subject: [PATCH] fix: force redstone wire into CUTOUT bucket to restore alpha cutout Minecraft 26.2 classifies RedStoneWireBlock as TRANSLUCENT instead of CUTOUT, causing its quads to land in the translucent geometry bucket which has no any-hit shader for radiance rays. Transparent pixels are not discarded and render as opaque reflective surfaces. Override the chunk layer to CUTOUT for RedStoneWireBlock so its quads enter the cutout bucket where the standard alpha-test any-hit shader handles them. Genuine translucent blocks (glass, ice) are unaffected. --- .../comfyfluffy/caustica/rt/terrain/RtTerrainMesher.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/dev/comfyfluffy/caustica/rt/terrain/RtTerrainMesher.java b/src/main/java/dev/comfyfluffy/caustica/rt/terrain/RtTerrainMesher.java index ec36584d..92178266 100644 --- a/src/main/java/dev/comfyfluffy/caustica/rt/terrain/RtTerrainMesher.java +++ b/src/main/java/dev/comfyfluffy/caustica/rt/terrain/RtTerrainMesher.java @@ -46,6 +46,7 @@ import net.minecraft.tags.FluidTags; import net.minecraft.util.RandomSource; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RedStoneWireBlock; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.FluidState; @@ -440,6 +441,14 @@ private void putFabric(MutableQuadView quad) { q.nx = nx; q.ny = ny; q.nz = nz; ChunkSectionLayer layer = quad.chunkLayer(); + // Minecraft 26.2 classifies redstone wire as TRANSLUCENT even though it is an alpha-tested + // cutout block (transparent background, opaque wire). Force it into the CUTOUT bucket so the + // any-hit shader can discard transparent pixels. Genuine translucent blocks (glass, ice) are + // unaffected — their TRANSLUCENT layer is correct. + if (layer == ChunkSectionLayer.TRANSLUCENT && state != null + && state.getBlock() instanceof RedStoneWireBlock) { + layer = ChunkSectionLayer.CUTOUT; + } q.cutout = layer != ChunkSectionLayer.SOLID; q.translucent = layer == ChunkSectionLayer.TRANSLUCENT;