1-pixel light leaks with Nanite meshes, also affects shadow pass

I’m using relatively dense (2m vertices) Nanite meshes as walls, the mesh contains both the interior and exterior surface, they’re water-tight (all vertices are welded, but they do use sharp edges) and I’m finding that in low lighting, they leak light like crazy in the form of obnoxious sparkling pixels around the screen.

The leaks are exactly 1 pixel typically but occasionally appear as long horizontal lines, the appearance is amplified by bloom. The problem is also visible in the Nanite debug views (Note the long string of pixels on the upper left corner):

Much to my immense frustration, it also affects the shadow pass, producing holes in the shadow depths for both Cascaded Shadow Maps and Virtual Shadow Maps:

Antialiasing methods can be used to hide the issue, specifically TAA. With No AA / FXAA producing the worst results by far:

The problem with simply adjusting the AA method is that:

  1. TAA is worse quality than TSR in most cases
  2. It still doesn’t fix the shadow leaking

This doesn’t seem to be a problem for low-poly Nanite meshes, as I blocked out my entire set with simplified nanite meshes and they worked fine.

Can anyone tell me, is this something that can be fixed? If so… how?

Not sure why this would be happening, but you could probably hide it by making the material two-sided, so the light can’t get through the backfaces of the opposite wall.

Thanks, honestly I feel silly for not having thought of that. It works, looks like Nanite just draws the cluster on the backfacing side to fill the hole.

Can’t say it feels good using a two-sided material this way but hey… it works.

wouldnt that be bad for performance? I have this same issue and theres no way in hell id make it double sided… will just add to more overdraw down the road.

I have this same problem on a brick wall. I fixed my shadow leaking through, but i still see those random pixels which is bad for culling meshes on otehr sides… each time a pixel shows up randomy it shows the object for a split second behind that wall.

To fix shadows alone u can swithc max edge length factor in the mesh to like .6 or something… and maybe even also enable preserve area.