Hello. I am now trying to make the shaders introduced by tharlevFX (Object Blending with Dither Fade, Pixel Depth Offset and Distance Fields - YouTube), but it do not behave as shown in the video. It works fine until around 10:36 in this video, but after that, when I connect it to the Opacity mask, it goes wrong like this (Unreal Engine 5 Distance Field + dither temporal AA error - YouTube). I want only the border area to be transparent, but the entire ball becomes transparent and hides behind another object. How can I fix this?
I’m using UE5 and Lumen. Generate mesh distance field is also turned on.
Any help would be appreciated.
Can you post the material graph?
Most likely your only option is to wait for Epic to fix this though (if they even can). There are currently numerous issues with sampling the global distance field (DistanceToNearestSurface):
Thanks for the reply! Here is the material graph. I am going to put dither temporal aa after the power node in the image.
Thanks for the info! So is this a bug rather than a configuration error? If anyone else knows how to solve this problem, please let me know.
Your code seems to work for me;
Are you using Unreal 5.0.2? Because this appears to be a bug that should be fixed in 5.0.2:
UE-147377 DistanceToNearestSurface Material Node breaks when connected to the Opacity Mask channel
5.0.2 Hotfix Released
Thanks! I just upgraded to version 5.0.2 and it fixed it!