diff --git a/cocos/renderer/backend/metal/RenderPipelineMTL.mm b/cocos/renderer/backend/metal/RenderPipelineMTL.mm index 2a0bf3dfe1..5d24966c71 100644 --- a/cocos/renderer/backend/metal/RenderPipelineMTL.mm +++ b/cocos/renderer/backend/metal/RenderPipelineMTL.mm @@ -297,14 +297,14 @@ void RenderPipelineMTL::chooseAttachmentFormat(const RenderTarget* renderTarget, PixelFormat& depthFormat, PixelFormat& stencilFormat) { - // Sets color attachment format + // choose color attachment format auto rtMTL = static_cast(renderTarget); auto rtflags = rtMTL->getTargetFlags(); for(auto i = 0; i < MAX_COLOR_ATTCHMENT; ++i) { colorAttachmentsFormat[i] = bitmask::any(rtflags, getMRTColorFlag(i)) ? rtMTL->getColorAttachmentPixelFormat(i) : PixelFormat::NONE; } - // Sets depth and stencil attachment format, match RenderTargetMTL::applyRenderPassAttachments + // choose depth and stencil attachment format, match RenderTargetMTL::applyRenderPassAttachments depthFormat = bitmask::any(rtflags, RenderTargetFlag::DEPTH) ? rtMTL->getDepthAttachmentPixelFormat() : PixelFormat::NONE; stencilFormat = bitmask::any(rtflags, RenderTargetFlag::STENCIL) ? rtMTL->getStencilAttachmentPixelFormat() : PixelFormat::NONE; }