encase icon indicating copy to clipboard operation
encase copied to clipboard

Support variable-sized arrays in uniform buffers via `arrayvec::ArrayVec`/`tinyvec::ArrayVec`

Open teoxoy opened this issue 1 year ago • 0 comments

Since the arrayvec::ArrayVec/tinyvec::ArrayVec types have a hard cap on the items they contain, the capacity can be used on the shader side as the fixed-size array length.

Besides being able to use these Vec-like data structures, this will also allow this trick to work (we should however note somewhere that reading beyond the actual length of items that were written will effectively return garbage data).

teoxoy avatar Jul 04 '22 19:07 teoxoy