I set the option to use custom depth, but it does not work after updating to version 4.26
turned on the render custom depth pass of the mesh and the allow custom depth writes of the material and set the alpha value by comparing the pixel depth and Scene Texture::Custom Depth in the material.
It works fine and doesn’t work after updating to version 4.26.
Does anyone know about this problem?
I just noticed the same thing, nothing shows up in the custom depth buffer visualization either when meshes are using translucent materials even with the allow custom depth writes like you said. Works on 4.25. I’m on Mac OS.
Possibly related, in a VR project of mine the custom depth buffer is only rendered for the right eye but is completely absent for the left eye. The project works fine in 4.24 - rendering appropriate custom depth buffers for both eyes - but as soon as I update it to 4.26 the problem appears. So far I’ve found no workaround.
We were using CustomDepth to handle translucent materials and it was working fine in 4.25 and earlier. When migrating to 4.26 the function stopped working.
I’m attaching a sample project and some images where you can see the problem
[project example][4]
Please file a bug report and share the link with us so we can vote and hopefully get it fix in the next hot fix.
trying to submit a bug report from this page Unreal Engine Community. Fill all the section but nothing happens when clicking Submit. Is it broken?
Found a work around by checking for zero-CustomDepth as shown in the picture below. So it is rather a difference with the previous version but now a bug per-say.
Same here
Actually, after playing around, I figured out where to add the check in my BP, and it seems to be working. This still feels like a bug.
I am having the same issue, but am not quite sure how to apply your workaround. (I think my method is a little simpler to start with and suits my needs.) Any idea what I could adjust on my BP below in order to perform the check that you are?
Translucent materials seem to be getting an automatic “discard” in the custom depth pass shader. This is causing major issues for our game.
Is there a fix for this coming?
This is causing problems for us too. I’ve been experimenting with rolling back selected changes from 4.26 to try to isolate the problem (we build the editor from source), but no luck yet. I’ll follow up here if I find the cause.
Try changing Opacity Mask Clip Value to 0.00 instead.
Related commit:
https://github.com/EpicGames/UnrealEngine/commit/99753c77f89f7982a6138b21a3847d46aae2cf0c
Setting Opacity Mask Clip Value to 0 didn’t work for us.
Hi David~ We’ve tested 4.26.0-Relese, it should work as expected. This source of this problem is releated to the commit I’ve post. Try to check your material Allow Custom Depth Write
attrib or the project settings?
Hey, this problem is fixed with this commit: https://github.com/EpicGames/UnrealEngine/commit/22be0c55959355bbf6dca097a3db1032d3e1c6ca
Some context for the interested: The reason this doesn’t work in 4.26 is because the behavior changed for how the custom depth texture was read in the custom depth pass itself. Prior to 4.26 it would always return far-plane value (because it was sampling a default 0 texture and calling ConvertFromDeviceZ() on it) and in 4.26 it was changed (as an optimization) to simply return 0 and not sample any default textures.
Anyway, the fix is a simple change to MaterialTemplate.ush, so you can simply apply that change to 4.26 and restart the editor to get the old behavior back.
YOU’RE AWESOME! THANK YOU THANK YOU
I managed to fix all with all the previous help to recreate exactly this demo:
It will solve most of the problems.
Then that’s not enough because the bug fix outputs a z into custom depth which looks not good for comparison.
You can compare that to a custom note called: ConvertFromDeviceZ(0); if it equals, output alpha 1. Then the custom depth will be exactly what we want
(post deleted by author)