Skip to content

Commit e55b069

Browse files
committed
clamp height in more sensible way
1 parent 88a821b commit e55b069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderers/webgpu/WebGPUBackend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ class WebGPUBackend extends Backend {
575575
let { x, y, width, height, minDepth, maxDepth } = renderContext.viewportValue;
576576

577577
width = x + width > renderContext.width ? width - 1 : width;
578-
y = Math.max( 0, renderContext.height - height - y );
578+
height = y + height > renderContext.height ? height - 1 : height;
579579

580580
currentPass.setViewport( x, y, width, height, minDepth, maxDepth );
581581

0 commit comments

Comments
 (0)