From 619c3988089094c4b1cf00f560a933d2c80c9284 Mon Sep 17 00:00:00 2001 From: hyde zhou Date: Mon, 18 Nov 2024 18:29:08 +0800 Subject: [PATCH] fix legacy pipeline viewport (#17875) --- native/cocos/renderer/frame-graph/DevicePass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native/cocos/renderer/frame-graph/DevicePass.cpp b/native/cocos/renderer/frame-graph/DevicePass.cpp index 4c538a108e5..874ea5119fe 100644 --- a/native/cocos/renderer/frame-graph/DevicePass.cpp +++ b/native/cocos/renderer/frame-graph/DevicePass.cpp @@ -404,6 +404,8 @@ void DevicePass::begin(gfx::CommandBuffer *cmdBuff) { _fbo.createTransient(); cmdBuff->beginRenderPass(_renderPass.get(), _fbo.get(), _scissor, clearColors.data(), clearDepth, clearStencil); + cmdBuff->setViewport(_viewport); + cmdBuff->setScissor(_scissor); _curViewport = _viewport; _curScissor = _scissor; }