Reputation: 187
I am working on an iOS OpenGLES 3.0 image filter app which need to read the pixel data from a texture, then loop through entire pixels, extract some pixels with some conditions like brightness over a threshold, then use every extracted pixel to draw sprites on the screen.
Now I am using Pixel Buffer Object (PBO) to fast read the image. But then I have to extract the specific pixels on the CPU side. It consumes lots of time with large image size. Is there any GPU side workaround to speed up the "pixel extraction" process.
One thought I have is to sample the image into vertex shader, do the extraction work, then export them out using Transform feedback? Is it feasible to implement?
Upvotes: 1
Views: 121