Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unity 23 and above unusable, MeshInstancing Broken

Discussion in 'High Definition Render Pipeline' started by GBhambra, Oct 31, 2023.

  1. GBhambra

    GBhambra

    Joined:
    Nov 17, 2018
    Posts:
    4
    I am amazed how this game breaking bug can continue through unity development pipeline for so long and have no place in forms.

    Tested in Unity 2023.1.18f1 HDRP

    If you instance a mesh via Graphics.DrawMeshInstanced or indirect taking a primitive cube mesh and HDRP lit material with GPU instancing.

    The result will look like the instance mesh have displaced from origin every frame with motion blur. If you turn motion blur to 0 from post processing its gone.

    upload_2023-10-31_11-58-43.png

    This bug breaks countless packages and techniques to render vegetation and large volume of meshes.
     
  2. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    690
    Hello,
    This is not really a bug, you need to use the new Graphics.RenderMeshInstanced API and provide the previous frame matrix for motion vector calculation.
     
    Last edited: Oct 31, 2023
  3. GBhambra

    GBhambra

    Joined:
    Nov 17, 2018
    Posts:
    4
    Thanks for reply, I didn't knew about this as most of vegetation spawning assets uses Graphics.DrawMeshInstanced and are incompatible with newer versions for the same thing. It would have been better if API functionality was not drastically changed like this. Anyways thanks for clarification
     
  4. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    591
    Honestly, I think it's up to third party developers to update their APIs accordingly, that's part of the maintaining aspect. If Unity weren't able to update, they wouldn't be able to grow progress or consolidate features, that would really sick for everyone.

    Usually, especially with major updates, revisiting would be a part of the "updating your asset" process.

    Things will of course break at first , as awareness and communication happens from a change, but most developers put their updates through within a few days.

    To help other developers, consider education them of the changes if they're unaware, even link them here for the link.

    :)
     
    Remy_Unity likes this.
  5. GBhambra

    GBhambra

    Joined:
    Nov 17, 2018
    Posts:
    4