waylonflinn/weblas

sdwns channel count

Opened this issue · 1 comments

NHQ commented

While attempting to max pool with weblas.sdwns, I first got an error (this one), about channel count must be a multiple of COMPONENTS_PER_PIXEL, in my case 4.

But I wasn't using 4-channel data. Is this a limitation? What if I am not pooling rgba data, but data of another dimension?

Excellent question. It is a limitation, but very possible to work around.

Standardizing on four element components allows optimizations that increase speed in most cases by 4x (because of available hardware instructions). If your data doesn't have four components the easiest solution is to repack it (with possible padding) to match.

This will likely be addressed in a future release.