Skip to content

Commit 5ab04a7

Browse files
Mee-guminggo
authored andcommitted
set default color attachment format (#20073)
1 parent 7c3a715 commit 5ab04a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cocos/renderer/backend/metal/RenderPipelineMTL.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ MTLBlendOperation toMTLBlendOperation(BlendOperation operation)
302302
// FIXME: now just handle color attachment 0.
303303
if (descriptor.colorAttachmentsTexture[0])
304304
colorFormat = descriptor.colorAttachmentsTexture[0]->getTextureFormat();
305+
else
306+
colorFormat = PixelFormat::DEFAULT;
305307
}
306308
else
307309
{

0 commit comments

Comments
 (0)