0
\$\begingroup\$

I was using tinkering with vulkan and was wondering if a SSBO can store a mix of structs of different kind like shown in picture and pass offsets of the said structs to access them in shader. SSBO layout

\$\endgroup\$
2
  • \$\begingroup\$ You can store an array of uint[] in your SSBO and interpret it the way you want \$\endgroup\$ Commented Oct 19 at 7:40
  • \$\begingroup\$ so i can store these different structs as array of uint[] and using offset passed by push constant access it as struct in shader? Like for example when we write c++ code we can cast an address to be interpreted as a struct or type we want , so in shader can we do something similar like access the uint[offset] or view them as a struct and access its members just like a struct would allow us? \$\endgroup\$ Commented Oct 19 at 12:16

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.