Search Issue Tracker

By Design

Votes

3

Found in

6000.0.38f1

6000.1.0b6

6000.2.0a4

6000.3.0a1

6000.4.0a1

Issue ID

UUM-98240

Regression

No

Custom motion vectors appear as zero vectors when rendering with RenderMeshInstanced in URP

-

Reproduction steps:
1. Open the attached “MotionVectorTest.zip” project
2. Open the “Assets/OutdoorsScene.unity“ Scene
3. Make sure that the Main Camera has the Post Processing enabled and anti-aliasing set to “Temporal Anti Aliasing (TAA)”
4. Enter the Play Mode
5. Open the Rendering Debugger (Window > Analysis > Rendering Debugger)
6. In Rendering Debugger, set the Map Overlays to “Motion Vector (100x, normalized)” (Rendering > Map Overlays)
7. Observe the Game view top right corner

Expected result: Both cubes should display correct motion vectors
Actual result: The left cube correctly displays motion vectors and the right cube appears black

Reproducible with: 6000.0.38f1, 6000.1.0b6, 6000.2.0a4
Couldn't test with: 2022.3.58f1 (There is no Motion Vector (100x, normalized))

Reproducible on: Windows 11
Not reproducible on: No other environment tested

  1. Resolution Note:

    As per the linked documentation for RenderMeshInstanced() (linked below):
    To support motion vectors with instanced mesh rendering you must provide a prevObjectToWorld matrix each frame via a custom instanceData structure.

    https://docs.unity3d.com/6000.2/Documentation/ScriptReference/Graphics.RenderMeshInstanced.html

Add comment

Log in to post comment