redwarp / kmeans-gpu

K-means clustering for image color quantization running on GPU
MIT License
14 stars 0 forks source link

Fix choose centroid dispatch size #1

Closed redwarp closed 2 years ago

redwarp commented 2 years ago

The dispatch size is rounded down, meaning some pixels will be omitted. The size of the colour buffer is also wrong, the same way.

I should first calculate the proper dispatch size, then create the colour buffer accordingly.