Hello

Let's say I have a scene with two MultiMeshInstance2D which have their own Multimesh. Is it possible that these two Multimesh use the same buffer so I only have to update position and color once but can draw two different Mesh with a different Shader each? I was able to copy the data by multimesh_1.buffer = multimesh_0.buffer but it would be nice to skip this and just use one buffer for both.
Greetings

  • xyz replied to this.

    xyz

    thanks for the answer. It works with the Mesh but sadly not with the Buffer

    • xyz replied to this.

      PyteByte Why is that not enough for you? Why do you insist on sharing the buffer? Just share the resource, the buffer comes along with it.

        xyz

        I can't reuse the whole Multimesh because then I have the same Mesh inside. If I make two Multimesh with a different Mesh I also get two different Buffers which I have to update each. Let's say I have 1000 objects and each object has a shadow draw below. This shadow has a different Mesh than the Mesh of the object above it. I update the object positions and don't want to update the shadow position again because it's the same position like the object anyway. That's why I would like to share the same Buffer.

        • xyz replied to this.

          PyteByte Copying the buffer is your only option in that case. If this is just for optimization, you shouldn't worry too much about it if it doesn't cause actual bottlenecks.

            xyz

            ok. thanks. yes I will just update the buffer twice for the moment.
            If someone knows some hack to make it happen that would be nice.