Decal flicker through moving StackLit Object after Upgrade [HDRP 10.10.0] to [HDRP 12.1.12]

Greetings everyone,

We are currently in the process of upgrading one of our projects from Unity 2020.3 (with HDRP 10.10.1) to Unity 2021.3 (using HDRP 12.1.11) 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.
9123169--1266076--Unity_2G6d9D9Bhx.gif
Video Preview of the Bug

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.

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.
The flickering also doesn’t appear when replacing the StackLit Shader with a normal Lit Shader.

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.10.1 and HDRP 12.1.11, that could be causing this issue.

We are 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 very much in advance for your assistance!

INFO:
The Bug has also been reported as: IN-46411

EDIT:
I’ve attached an example project that shows our Problem (HDRPStackLitCheck.zip)

9123169–1266079–HDRPStackLitCheck.zip (1.34 MB)

1 Like

This problem appears even in the latest Unity 2022 LTS Version with HDRP14.
We still haven’t found a solution other than disabling Motion Vectors, which shouldn’t be the solution

2 Likes

Is there any news on this bug? I’m getting it even in Unity 2023.
It’s impossible for me to turn off motion vectors in my project as that will remove the ability to use DLSS.

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?!