Decal flicker through Objects after Upgrade [Unity 2020.3 / HDRP 10.0] to [Unity 2021.3 / HDRP 12.1]

Greetings everyone!

We are currently in the process of upgrading one of our projects from Unity 2020.3 (with HDRP 10.0) to Unity 2021.3 (using HDRP 12.1) and have encountered an issue related to decals and the StackLit HDRP shader.

Post upgrade, the street decals have started to flicker through our vehicles, as depicted in the GIF linked below:

Let me share some more details about the setup:

The materials for our vehicles utilize a StackLit HDRP Shader as the vehicles have decals themselves. The road decals, on the other hand, are rendered using a Decal HDRP Shader. Both of these shaders were designed in ShaderGraph.

I am hoping to find a solution for this issue as it was not present prior to the upgrade. Any insights or suggestions on why this might be happening and how to fix it are greatly appreciated. Also, if anyone has encountered a similar issue while transitioning between these Unity versions, sharing your experience could be of great help!

Thank you in advance for your assistance!

Hello again everyone,

We’ve made some progress on the issue related to decals and the StackLit HDRP shader that I mentioned earlier.
After some investigation, we’ve been able to narrow down the problem to the Motion Vectors.

We found that when we disable the Motion Vectors in the HD Render Pipeline Asset, or when we deactivate the “Opaque Object Motion” in the Rendering Debugger => Camera => Rendering, the flickering stops.

This leads us to believe that the issue is related to how the Motion Vectors are interacting with the decals and the StackLit HDRP shader.
However, we would like to keep the Motion Vectors enabled for our project, so we’re still looking for a solution that allows us to do this without causing the decals to flicker.

We’re wondering if there were any changes relating to the Motion Vectors between Unity 2020.3.45f1 and 2021.3.23f1, or between HDRP 10.1 and HDRP 12.1, that could be causing this issue.

If anyone has any information about this, or any suggestions for how to fix the issue while keeping the Motion Vectors enabled, we would greatly appreciate it.

Thank you very much in advance!

still no fix with unity hdrp 2021.3 have the same issue they are overlaping

i did more digging the problem appears only when the rendering is set to deferred rendering :confused:

any body from unity have suggestions or a quick fix

The problem still persists in latest Unity 6 with our custom terrain shader where we need to manually disable “Opaque Object Motion” under camera’s Frame Settings to avoid washed away-ish rendering on terrain which covers most of the scene. Since our shader is complex, we have no idea where the issue is and what needs to be done in our shader or have no idea if this is a bug or not?!

In our tests, it’s the same issue for both Deferred & Forward and it only happens when in game mode!