# Highlight/custom depth stencil stopped working in 4.22

**URL:** <https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569>\
**Category:** Rendering\
**Tags:** stencil, unreal-engine, UE4, question, Blueprint\
**Created:** [April 4, 2019, 1:27am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569 "2019-04-04T01:27:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DraggonX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DraggonX](https://forums.unrealengine.com/u/DraggonX)\
**Post date:** [April 4, 2019, 1:27am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/1 "2019-04-04T01:27:37Z")

</div>

I have a VR project that has a custom depth stencil to highlight objects that I can pick up when my controller overlaps them. It was working fine in 4.21, but now the highlighting is not appearing on the object but instead is rendering off the object and is jagged and distorted and not the shape of the object.

I am using [UVRF Hands](https://forums.unrealengine.com/development-discussion/vr-ar-development/1381972-uvrf-handpresence-template-for-rift-vive-free-shooting-range-update-1-3-laser-interactions) which is where the highlighting came from.

I am not sure where to begin to fix the problem. Any suggestions would be appreciated.

---

<div class="post-metadata">

**Author:** ![digitalbug](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/digitalbug/32/690424_2.png) [@digitalbug](https://forums.unrealengine.com/u/digitalbug)\
**Post date:** [April 4, 2019, 8:28am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/2 "2019-04-04T08:28:12Z")

</div>

I have same problem with 4.22 with my custom outlinematerial. It was fine in 4.21.

---

<div class="post-metadata">

**Author:** ![DraggonX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DraggonX](https://forums.unrealengine.com/u/DraggonX)\
**Post date:** [April 5, 2019, 7:40pm UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/3 "2019-04-05T19:40:38Z")

</div>

In searching around I found this thread: [https://answers.unrealengine.com/questions/453016/view.html](https://answers.unrealengine.com/questions/453016/view.html)  
Which is basically the same problem back in 4.12.

I turned off stereo instancing and the highlight is working again. So I guess the question now, is there a workaround or does this need to be reported as a defect?

---

<div class="post-metadata">

**Author:** ![LenaAlthammer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LenaAlthammer](https://forums.unrealengine.com/u/LenaAlthammer)\
**Post date:** [April 11, 2019, 3:56pm UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/4 "2019-04-11T15:56:54Z")

</div>

I filed a bug report and was directed here: [Unreal Engine Issues and Bug Tracker (UE-72551)](https://issues.unrealengine.com/issue/UE-72551)

---

<div class="post-metadata">

**Author:** ![TheG481](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheG481](https://forums.unrealengine.com/u/TheG481)\
**Post date:** [April 17, 2019, 7:44am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/5 "2019-04-17T07:44:12Z")

</div>

For me there seemed to be an issue where Eye Adaptation influenced the custom depth pass. Instead of disabling Stereo Instancing, i just went to the PostProcessVolume and set MinBrightness and MaxBrightness both to 1, under the Lens-\>Exposure section. This fixed the issue for me.

---

<div class="post-metadata">

**Author:** ![LenaAlthammer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LenaAlthammer](https://forums.unrealengine.com/u/LenaAlthammer)\
**Post date:** [April 24, 2019, 3:42pm UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/6 "2019-04-24T15:42:11Z")

</div>

Doesn’t work for me unfortunately.

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [April 29, 2019, 2:42pm UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/7 "2019-04-29T14:42:51Z")

</div>

Any news on this?

---

<div class="post-metadata">

**Author:** ![DraggonX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DraggonX](https://forums.unrealengine.com/u/DraggonX)\
**Post date:** [April 30, 2019, 8:41am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/8 "2019-04-30T08:41:23Z")

</div>

I just installed the latest hotfix, but no change.

---

<div class="post-metadata">

**Author:** ![Frisco](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frisco](https://forums.unrealengine.com/u/Frisco)\
**Post date:** [May 3, 2019, 9:53am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/9 "2019-05-03T09:53:05Z")

</div>

Yep. Documents said, it should fix the problem but unfortunately it didn’t. It’s so bummer if we need to wait till 4.23 😕

---

<div class="post-metadata">

**Author:** ![m4d3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@m4d3](https://forums.unrealengine.com/u/m4d3)\
**Post date:** [May 28, 2019, 8:46am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/10 "2019-05-28T08:46:17Z")

</div>

Bump,  
this really is a big problem for us right now. I tried several workarounds, with no real acceptable solution. Im using a transluent material with “disable depth test” enabled at the moment, but i need some sort of sorting so it does not get drawn above the player hands etc.

---

<div class="post-metadata">

**Author:** ![User-970075953](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@User-970075953](https://forums.unrealengine.com/u/User-970075953)\
**Post date:** [May 29, 2019, 2:18pm UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/11 "2019-05-29T14:18:55Z")

</div>

Agreed. This is a showstopper bug as disabling depth tests or removing instanced stereo are unworkable solutions. This needs a hotfix as we could be waiting until September for an update (and therefore our customers wait too).

---

<div class="post-metadata">

**Author:** ![AliceHalley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/alicehalley/32/1033330_2.png) [@AliceHalley](https://forums.unrealengine.com/u/AliceHalley)\
**Post date:** [July 26, 2019, 10:24am UTC](https://forums.unrealengine.com/t/highlight-custom-depth-stencil-stopped-working-in-4-22/446569/12 "2019-07-26T10:24:11Z")

</div>

Same here. This is a nightmare and a huge infliction on the interface and post processing in our project. I really hope this gets sorted soon in a hotfix, since it will be a nightmare to update the entire project to a new version during development.
