When a RenderPassDescriptor provides a depth clear value, createRenderPass() sets _depthMask(true) and adds 256 to clearMask, but never actually issues the clear. The correct call, GlStateManager._clearBuffer(clearValue.getAsDouble()), exists elsewhere in the codebase (clearDepthTexture() uses it correctly) but is simply missing here. The clearMask variable is only used to conditionally set up the scissor state for the render pass, never passed to any GL clear function. Any mod or future vanilla code passing a non-empty depth clear value via createRenderPass() will silently get no clear at all, leading to depth buffer artifacts and incorrect occlusion. The fix is a single missing call to GlStateManager._clearBuffer(clearValue.getAsDouble()) inside the if (clearValue.isPresent()) block here https://mcsrc.dev/1/26.2-pre-1/com/mojang/blaze3d/opengl/GlCommandEncoder#L175 .
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Could you please explain how this issue affects an average user's experience?
Just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki