# Beginning Metal - Part 8: Depth | Ray Wenderlich

**URL:** <https://forums.kodeco.com/t/beginning-metal-part-8-depth-ray-wenderlich/23030>\
**Category:** 🎓 Courses & Articles\
**Created:** [November 23, 2016, 5:03pm UTC](https://forums.kodeco.com/t/beginning-metal-part-8-depth-ray-wenderlich/23030 "2016-11-23T17:03:25Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![caroline](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/caroline/32/111867_2.png) [@caroline](https://forums.kodeco.com/u/caroline)\
**Post date:** [July 5, 2017, 3:33am UTC](https://forums.kodeco.com/t/beginning-metal-part-8-depth-ray-wenderlich/23030/15 "2017-07-05T03:33:17Z")

</div>

@lordandrei - I regard this as an error in the original video.

@novistream posted a link to explain why it worked differently on iOS before, and now they’ve fixed it on iOS 11:

[https://forums.developer.apple.com/message/180131#180131](https://forums.developer.apple.com/message/180131#180131)

@bababoega posted the fix above:

In `viewDidLoad()`, right below `metalView.clearColor = Colors.wenderlichGreen`, add:

```
metalView.depthStencilPixelFormat = .depth32Float

```

Also, in **Renderable.swift** , below `pipelineDescriptor.vertexDescriptor = vertexDescriptor`,  
add

```
pipelineDescriptor.depthAttachmentPixelFormat = .depth32Float

```

Thanks for your help, guys 👋

---

_[View the full topic](https://forums.kodeco.com/t/beginning-metal-part-8-depth-ray-wenderlich/23030)._
