# 4.20 broke my Depth Buffer

**URL:** <https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154>\
**Category:** Rendering\
**Tags:** depth, unreal-engine, Rendering, question\
**Created:** [September 4, 2018, 1:22pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154 "2018-09-04T13:22:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_eec879e41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eec879e41](https://forums.unrealengine.com/u/anonymous_user_eec879e41)\
**Post date:** [September 4, 2018, 1:22pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/1 "2018-09-04T13:22:55Z")

</div>

## Edit##

Turns out it’s a bug! Check [UE-64034][1] for progress on a solution. Thanks to everyone who helped me.

## TL;DR

Unreal’s renderer has been corrupted for me since 4.20 released. I _suspect_ that there’s something wrong with my depth buffer. Here’s what the depth buffer looks like before and after entering VR.

 ![252684-depthbufferaftervr.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/d/f0d21caeed25931ceefbdcbfb3e8b4b0f4abb795.png)

## In Detail

Sooo after updating to Unreal Engine 4.20 I’ve been having some issues making VR content.

Whenever I enter VR **everything** Unreal renders gets corrupted (even thumbnails!). Eventually I figured out that the scene depth buffer get messed up by entering VR. To fix this I can restart UE or take a ‘High Resolution Screenshot’.

Best of all: Everything is fine in UE 4.19, and the preview builds of 4.20 also worked flawlessly. Some change in 4.20 probably broke my depth buffer.

At this point I’ve tried pretty much everything except for replacing my graphics card and reinstalling Windows.

**I’d be happy about any suggestions! :]**

## Things I’ve tried

-Creating an empty project

-Reinstalling UE 4.20

-Updating my graphics card driver

-Rolling back my graphics card driver

-Deleting all sorts of derived data caches

-Making posts on the forum, the Answerhub, Reddit, the Unreal Slackers Discord, …

-Not using DirectX (Actually works, but Vulkan and OpenGL crash frequently.)

-Using the forward renderer, using instanced stereo

Here’s my DxDiag. [3]

[And here’s an image of the renderer overview: Click me][4]

## Have I missed anything? Any comments appreciated!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_98092ca1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_98092ca1](https://forums.unrealengine.com/u/anonymous_user_98092ca1)\
**Post date:** [September 4, 2018, 2:26pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/2 "2018-09-04T14:26:42Z")

</div>

Looks like [DirectX VR issues in 4.20 - XR Development - Epic Developer Community Forums](https://answers.unrealengine.com/questions/822616/directx-vr-issues-in-420.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_eec879e41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eec879e41](https://forums.unrealengine.com/u/anonymous_user_eec879e41)\
**Post date:** [September 4, 2018, 5:23pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/3 "2018-09-04T17:23:51Z")

</div>

Thanks for the reply. That’s actually my post as well. But I felt like I didn’t describe the issue accurately since I’ve learned a couple new things. Thank you for your replies in that post as well.

I don’t suppose you’ve seen any other threads with my issue?

Edit: I’m also having trouble getting replies. So far you’re the only person who’s replied to any of my question on the forum or Answerhub. Do you have any tips on getting more answers?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_942e8e52](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_942e8e52](https://forums.unrealengine.com/u/anonymous_user_942e8e52)\
**Post date:** [September 12, 2018, 8:31pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/4 "2018-09-12T20:31:50Z")

</div>

Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here [Unreal Engine Issues and Bug Tracker (UE-64034)](https://issues.unrealengine.com/issue/UE-64034) You can track the report’s status as the issue is reviewed by our development staff.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_eec879e41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eec879e41](https://forums.unrealengine.com/u/anonymous_user_eec879e41)\
**Post date:** [September 12, 2018, 10:05pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/5 "2018-09-12T22:05:12Z")

</div>

Goodness. Thank you so much! Thought there’d never be a solution in sight. 🙂

Glad that the bug report reached you quickly.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_eec879e41](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_eec879e41](https://forums.unrealengine.com/u/anonymous_user_eec879e41)\
**Post date:** [October 14, 2018, 8:00pm UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/6 "2018-10-14T20:00:06Z")

</div>

## Edit: It’s an AMD driver bug. Disable “Flags.bCompositeDepth” in “Oculus\OculusVR\Source\OculusHMD\Private\OculusHMD\_Settings.cpp”

After the issue was marked as “ **Won’t fix** ”, as a last resort, I tried to find the bug myself.

I found it. So here it is. Reverse this commit and compile your own version of the Unreal Engine.

EpicGames/UnrealEngine/commit/bd51b2429fb5512e30d21d6e9199843c400c1557

Here are the instructions for getting GitHub access to the source code.

[https://www.unrealengine.com/en-US/ue4-on-github](https://www.unrealengine.com/en-US/ue4-on-github)

---

<div class="post-metadata">

**Author:** ![JUDGE\_DREDD\_VR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JUDGE\_DREDD\_VR](https://forums.unrealengine.com/u/JUDGE_DREDD_VR)\
**Post date:** [February 5, 2019, 1:20am UTC](https://forums.unrealengine.com/t/4-20-broke-my-depth-buffer/433154/7 "2019-02-05T01:20:40Z")

</div>

After change OculusHMD\_Settings.cpp meed only Build new Version or need Buiild sln?
