Replies: 3 comments 1 reply
-
The best approach depends upon hat is you end goal with this work. I don't know anything about this so I can't provide suggestion. How does the index related to the models? How would the shaders using this index? |
Beta Was this translation helpful? Give feedback.
-
There is such a code in assimp in vsg. I read a glb model, the index has two types uint16_t and uint32_t, I want to pass these two types together to glsl via ssbo. But it is not known how these two types should be represented in a container. |
Beta Was this translation helpful? Give feedback.
-
Are you simply referring to the primitive indices? These aren't passed to GLSL shaders, they are simply used by the GPU to map the which vertices in the vertex arrays to pass to the vertex shaders. Now, please take a step back and explain what you end goal is as your explanation really just isn't help us guess what on earth you are trying to do and why. It might be you have just misunderstand how Vulkan works so are heading off in the wrong direction. |
Beta Was this translation helpful? Give feedback.
-
I wrote a visitor to get the index of the model. But there are two types of index, I'm converting both of them to uint32_t and storing them in an array, which is then given to glsl via ssbo. This results in wasted memory. I wonder if there is any other way to pass it directly to glsl without converting it to uint32_t.
Beta Was this translation helpful? Give feedback.
All reactions