The SceneDepth material node is broken on 4.16

On 4.16, SceneDepth returns an empty black color.

I have a HUD material drawn on the screen with Canvas::DrawMaterialSimple. I use the SceneDepth material node to filter out some parts of the screen (cockpit geometry) so that the HUD isn’t drawn on top of it.

Here is the material graph :

4.15 render (correct) :

4.16 render (broken) :

The material is just drawn as-is.

This happens on the 4.16.0 release and happened on the 4.16 Preview 3 too. The bug doesn’t reproduce on 4.15 or previous versions.

Hey Gwenn,

Thanks for the report. I’ve reproduced and logged this issue, which you can track using the link below: Unreal Engine Issues and Bug Tracker (UE-45634)

Have a great day

It appears that the setup in question was only working through coincidence in previous versions. I added the developer comment as a public note on the ticket, but it appears that currently this is a desired feature that will be considered for implementation in the future.

The best fix I can suggest here is for the user to copy the depth texture and use that during the UI rendering. This is a desired feature but there isn’t a stable path to support it right now but that will be looked into for future engine versions.

Thank you for the explanation. Could you point me to how I can copy the scene texture ?

Well, I found a workaround. I moved the HUD to the global post-process volume as a blendable material, using the depth from the post-process stage. This seems to work fine and negates the 4.16 behaviour.

While this looks like dirty hack, it also allows us to move forward on 4.16, so i’ll close this ticket.

Thank you for your support.

Well, I found a workaround. I moved the HUD to the global post-process volume as a blendable material, using the depth from the post-process stage. This seems to work fine and negates the 4.16 behaviour.

While this looks like dirty hack, it also allows us to move forward on 4.16, so i’ll close this ticket.

Thank you for your support.

Sean, the bug report was just marked as “By Design”. Does this mean this feature is permanently removed ?