UE5.8 masked material not rendering alpha correctly on sprites

Heya

We’ve recently upgraded to Unreal 5.8.1. Since then we’ve started noticing some flickering black parts on Paper2D Sprites with the Unreal default MaskedUnlitSpriteMaterial.

It’s most noticeable in the Tilemap Editor.
We’re using 100x100 Tiles in the Tileset centered on 60x60 Tiles in the Tilemap, with most of the 20px padding in each direction being fully alphaed. Which used to look like this:

And now looks like this:

The former can still be achieved with a translucent Material, which is not an option for us sadly.

As you can see, if there are overlapping sprites, the overlapped Area is not rendered correctly, but rather black. If there is no overlap, the alpha is rendered correctly (as seen on the left edge of the painting area).
This also happens with other exactly overlapping sprites with alpha. And also with disabled & hidden WidgetComponents at exactly the same Y position as a Sprite.

Again, this is using the default MaskedUnlitSpriteMaterial from Unreal, no custom Materials.

Does anyone have an idea what is going on here? Or how to fix it?

Thank you!

Can you see if giving the sprites different Y values or adjusting the tilemap SeparationPerLayer has an impact? Another possibility is this is related to the early z pass, which you could check by restart the Editor with r.EarlyZPass=0. You don’t want to leave that off, because that’ negatively impact performance, but it provides a clue if the sprites overlapping is causing a z-fighting issue.
Also, avoid using the same Y position for the WidgetComponents to avoid z-fighting where they overlap.

While i could not test what the starter described, one of my test tilemap projects experienced some other errors with TSR thanks to the new update (UE 5.8.2). Its also using a masked material.
I know, that Paper2D and all that temporal stuff does not work together really well, but this is way worse than ever before o.O

Edit, after some testing, it turned out, that the tileset for this particular test map had no padding (that you get, when you use the condition tileset function), and the white tile was surrounded by empty tiles. After adding the padding, these massive glitches are gone. But even without padding was it never that extreme.

Different Y values fixes this, yes. But the shown tilemap is painted on the same layer, thus the same Y value.

r.EarlyZPass=0 did not change anything.

I’ll also upgrade to 5.8.2, just in case