regl icon indicating copy to clipboard operation
regl copied to clipboard

Can mat4 matrices be passed as attributes ?

Open kaosat-dev opened this issue 4 years ago • 0 comments

Today I ran into issues when passing a mat4 as attribute (for instanced rendering) : no error thrown but garbled results. I am posting this here so other people can find a reference if they run into the same issue.

@rreusser was kind enough to investigate and write up his finding here : https://observablehq.com/d/5d26be01eb1cc163 TLDR: " Turns out you can only pass vec4s and then assemble them into a mat4 in the shader"

Hope this can help!

kaosat-dev avatar Jan 28 '21 19:01 kaosat-dev