Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Why does setting a non-zero move meshes?

Discussion in 'General Graphics' started by b0nes123, Apr 6, 2021.

  1. b0nes123


    Nov 6, 2019
    Hi all, I've been playing around with Graphics.DrawMeshInstancedProcedural, but I've ran into an issue with the Bounds parameter. Whenever I set the to any non-constant amount, the mesh is moved by a corresponding amount. To illustrate this, here are 64 chunks rendered with GraphicsDrawMeshInstancedProcedural.

    bounds no mid.PNG

    Each quad is rendered with its own separate call of the Graphics.DrawMeshInstancedProcedural method, and each is set to zero. However, when I set the to the midpoint of each chunk this happens:


    Since, as I understand it, the Bounds parameter is only telling the GPU if the mesh should be rendered not where the mesh should be rendered, why does Bounds have any effect on the position of the mesh being rendered?
    Last edited: Apr 6, 2021