Custom Depth problem blinking when you go far away

Hi there!
I have a weird bug or problem with Custom Depth.
For some reason, when I activate Render Custom Depth in all actors I want (in this video, plants and a square which represents water), I could see the silhouette ok. If I go far away from them, the silhouette of the plants starts to blink when I move the mouse and the draw itself have to get visible through another actor or mesh.

Why could this be happening?
What error could I have done?
I add video:

I have noticed that CustomDepth was working perfectly in Editor If I enable it in Editor, but doesnt work during Gameplay when I spawn because CustomDepth is disabled from the begining and I activate it once I press V using two nodes: Set Render Custom Depth and Set Custom Depth Stencil Value to make it not visible when you start and only visible when you press V. So I tested enabling it by default and it also worked during gameplay.

My solution have been enabling CustomDepth from the start after the map is loaded and add a delay of 10 seconds in Event BeginPlay.
After that delay, I set Render CustomDepth to disabled so its not visible.
From now, when I press V to set Render CustomDepth to enabled, plants doesnt blink as in my video

I managed to fix it by changing the following project option: Project Settings> Engine> Rendering> Postprocessing> Activate the option: “Custom Depth with TemporalAA Jitter”

2 Likes

4.26 still seems there are problems with flickering when you dynamically change Custom Depth and stencil value is higher than 1. TemporalAA Jitter is not helping.
I am just keeping Custom Depth which works well.