Open mourner opened 3 years ago
I tested it locally and it works, so I think you could simplify some code around this and update docs. 🎉
Ah nice! Didn’t realize subarray works like that. I guess there is a bit more GC churn compared to WebGL2 but probably not such a big deal.
Thanks! Will update docs.
@mattdesl probably shouldn't affect GC much, since subarray
is just a view into the same memory.
@mattdesl Thanks for the amazing library! Quick question — is there any particular limitation that prevents us from reading RGBA pixels of a WebGL 1 context into encoder memory?
Looking at
readPixels
docs, WebGL 2 introduces an optionaloffset
argument, but can't we simply make an offset view into the buffer instead, e.g. like this?