Creative Coding
Here are some creative coding approaches that I found
Convert 2D Pixel Position into Single Integer Index
The formula to convert the position of a pixel on a texture into an index is index = y*texture_width +x.
Here are some creative coding approaches that I found
The formula to convert the position of a pixel on a texture into an index is index = y*texture_width +x.