Masked-out pixels cause camera-dependent z-fighting between overlapping planes

Summary

In UE 5.8, overlapping planar meshes using a Masked material produce z-fighting artifacts in areas that should be fully discarded by the opacity mask. The same setup worked previously in UE 5.5.

What Type of Bug are you experiencing?

Rendering (Graphics / Niagara)

Steps to Reproduce

  1. Create two plane meshes.

  2. Place them close together (e.g. overlapping) and uzing the same depth (z value).

  3. Create a simple Masked + Unlit material, with the RGB values of a transparent texture plugged into the emissive colour value, and its alpha value plugged into the opacity mask value.

  4. Apply the masked + unit material to both meshes.

  5. Look at the intersecting areas of both meshes and the z-fighting artefacts that appear between the transparent areas of one mesh, and the opaque areas of another mesh.

  6. Move the camera around and see how the z-fighting artefacts only occur on these areas.

Expected Result

Fully masked-out pixels should not contribute depth or interfere with other overlapping masked surfaces.

Observed Result

Horizontal/diagonal striped artifacts appear and move with the camera, consistent with z-fighting/depth-buffer competition. The interference occurs in pixels that should have been discarded by the opacity mask.

Affects Versions

5.8

Platform(s)

Windows

Upload an image

For crash reports, include your callstack

No crashes.

Additional Notes

  • Works correctly in UE 5.5.
  • Reproduces in UE 5.8.
  • Switching the same material to Translucent removes the issue.
  • Reproduces with a minimal Masked/Unlit material.
  • r.EarlyZPassOnlyMaterialMasking 1 does not change the behavior.
  • Nanite not enabled on the planes.
  • Virtual textures not being used, etc…

Oh, forgot to mention, this problem persists on version 5.8.0 and 5.8.1.