mojira.dev
MC-310830

The scissor bounds check ignores the render area's Y offset

RenderPass.enableScissor throws IllegalArgumentException for scissor rectangles that are fully inside a render area whose Y offset is non-zero.

https://mcsrc.dev/1/26.3-snapshot-7/com/mojang/renderpearl/frontend/FrontendRenderPass#L187-203

         if (x >= this.renderArea.x()
            && y >= this.renderArea.y()
            && x + width <= this.renderArea.x() + this.renderArea.width()
            && y + height <= this.renderArea.height()) {

The Y upper bound is compared against the render area's height alone, while the X check on the line above adds the render area's X offset to its width.

Adding the Y offset to that comparison makes both axes agree.

Comments 1

Lolo

Timur Nazarov

Community Consensus

Platform G

Normal

Rendering

26.3 Snapshot 7

26.3 Pre-Release 1

Retrieved