From a300b75a2fe14ac1688184612e1b63ad652895ba Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 22 Nov 2020 23:43:18 -0800 Subject: [PATCH] Merge: 0d04e20b50 eee60b9d99 Merge pull request #276 from aismann/master Same as on 3.17 (with small changes) --- cocos/renderer/backend/metal/CommandBufferMTL.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/renderer/backend/metal/CommandBufferMTL.mm b/cocos/renderer/backend/metal/CommandBufferMTL.mm index 24bfd7c58b..10c7331fe6 100644 --- a/cocos/renderer/backend/metal/CommandBufferMTL.mm +++ b/cocos/renderer/backend/metal/CommandBufferMTL.mm @@ -253,7 +253,7 @@ void CommandBufferMTL::setViewport(int x, int y, unsigned int w, unsigned int h) viewport.originY = (int)(_renderTargetHeight - y - h); viewport.width = w; viewport.height = h; - viewport.znear = -1; + viewport.znear = 0; viewport.zfar = 1; [_mtlRenderEncoder setViewport:viewport]; }