Search Unity

Bug TAA produces artifacts for rendered entities

Discussion in 'Graphics for ECS' started by scottjdaley, Feb 6, 2023.

  1. scottjdaley

    scottjdaley

    Joined:
    Aug 1, 2013
    Posts:
    163
    Hey, I was wondering if TAA is supposed to be compatible with entities. Specifically with URP?

    When I try to enable TAA, I'm seeing artifacts around the edges of any rendered entity. The exact same mesh and material works fine on a game object.

    I made a new empty project in unity 2022.2.5f1 using the URP core template. Added two cubes both using the URP Lit shader. The left one is a game object and the right is an entity inside a subscene.

    With TAA off, the cubes are rendered the same:
    No_TAA.png

    With TAA on, the right cube (the entity) has artifacts along its edges:
    With_TAA.png

    I did a little debugging and I noticed that the Motion Vectors pass is producing very different results for the entity compared to the game object.

    TAA_motion_vectors.png

    This motion vector texture is then used by the TAA pass.

    Just to be clear, this scene is static. Neither the game object, entity, nor camera are being moved.

    I'm happy to submit a bug with the repro project if that is helpful. Thanks!
     
    Lukas_Kastern likes this.
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    This definitely looks like a bug, the motion vectors should be zero if the entity is not moving.
     
    scottjdaley likes this.
  3. scottjdaley

    scottjdaley

    Joined:
    Aug 1, 2013
    Posts:
    163
    I believe this bug was still occurring in the latest version of entities graphics and urp. However, I recently enabled the RenderGraph execution path in my project and TAA motion vector calculations appear to be working correctly with entities now.