CH14: Build GBuffer Pass Descriptor

After adding all the code up to page 404 I get this error when executing on a iMac retina screen

[MTLDebugBlitCommandEncoder validateCopyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:256: failed assertion `(sourceOrigin.x + sourceSize.width)(960) must be <= width(480).’

changing the line found on page 400 from
buildGBufferRenderPassDescriptor(size: size)
to
buildGBufferRenderPassDescriptor(size: view.drawableSize)
fixed the problem

2 Likes

@mjeragh Thank you for sharing your solution - much appreciated! :]

1 Like