I have this problem when I try to use the new 4.13 mesh decals and I see the decals from distance :
The decals ends up being rendered on top of every object when moving far enough.
I activated Dbuffer, early Z-pass “Opaque and Masked meshes” and Movable in early Z-pass.
My decal is in Dbuffer translucent color blend mode.
Did I miss something ? Is there a way to avoid this problem ?
We have also come across this problem on our PS4 build as well and are looking for a good solution. Not sure whether it is related to any LODs or the materials that the decal is then drawing onto.
actually I don’t really know how they plan to fix this
if you remove this part of the shader code you get a lot of Z-fighting (tried it). if they expose the value of “how much to push towards the camera” then the users will be caught up in choosing between Z-fighting or decals going on top of other things… or both
this all comes because mesh decals don’t really behave like decals. not in the way of being “projected” like a regular decal (which is very non trivial to do)
all they are, are meshes that get rendered on the decal pass and as such benefit from a few of its features
Thanks vebski ! I’ve removed “Output.Position.z += 0.0001f * Output.Position.w;” Now it seems to work perfectly for what I need.
Here’s an exemple of great mesh decals in Blizzard Overwatch :
As you can see, they have big offsets probably to avoid Z-fighting but in game you don’t see it if you don’t look really close.
…Okay, so this is an old one here, but I ran into that issue my self now,… using mesh decals on big meshes, hiding transitions and stuff…, here is a example where I generate the graphics on the runway with actual geometry, this geo hovers only 1cm above the Runway, quite close
so, at first it looked like this when looking from a distance:
Then, going into the Material and changing the Decal blendmode to “Dbuffer…”:
and voila, no decal ghosting through the other meshes…at any distance…
and in motion everything’s fine now
Okay to be Honest, this is in UE5 EA … Gotta check out if this also applies to UE4…