On supporting DOTS Deformation Motion Vectors

Perhaps some of these questions I'm asking may be better suited for other graphics subforums. But what prompted this is the awkward state of this feature, and me evaluating whether or not I want to provide full shader compatibility.

I have a custom skinning and rendering solution, and unlike Entities Graphics, I perform culling before skinning. This means that for motion vectors, I don't always have a previous frame's deformed mesh hanging around. Instead, I keep a history of the bone transforms (I needed it for inertial blending anyways) and skin the mesh in the previous frame's pose. It would greatly simplify my solution if I could put both the present and previous skinned meshes in the same graphics buffer (not bone-interleaved, just the same buffer). But the DOTS deformation shaders seem to bind two separate buffers.

First question, is it legal to bind the same buffer to two separate global uniforms in a shader as readonly? It is surprisingly difficult to find info on this because it is one of those "why would you ever do that?"

And if not, I noticed a comment by DeformedMeshIndex that suggests there are plans to split the component up in the future. What is the status of those plans? And what would the result look like?

1 Like

As far as I know, it should be legal to use the same buffer for several uniform buffer bindings at once. Problems happen if you try to mix read-only with read-write.

1 Like

No changes to DeformedMeshIndex have landed yet (or are in the pipeline) nor do I expect them to change in the near term. I cannot share much as to what the changes would look like either.

1 Like

I appreciate the answers. As long as the multiple bindings work, I should be able to make things work. I'll at least give it a shot.

1 Like