mojira.dev
MC-310719

`copyTextureToBuffer` binds depth textures as a color attachment with the OpenGL rendering backend

The source texture is always passed in the color slot of bindFrameBufferTextures, so a depth-format texture lands on COLOR_ATTACHMENT0 and the read FBO becomes GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. glReadPixels then also asks for DEPTH_COMPONENT from a framebuffer that has no depth buffer. Vulkan does this correctly via formatAspectMask.

Comments 1

Lolo

rabrandt

Community Consensus

Platform G

Normal

Rendering

26.3 Snapshot 7

26.3 Snapshot 10

Retrieved