What i want to do is read all the texels of a 2Dtexture to find a texel that has 1 special value, there is always only one texel or none with this special value, then i want to save its (x,y) texture coordinates to use the texel in other frames.
so my problem is a fast way to save that location.
Rendering to a texture with just 1 texel the (x,y) coordinates, is a solution but i want to know if there are better ways.
3 replies to this topic
Sponsor:
#4 Crossbones+ - Reputation: 293
Posted 15 December 2012 - 12:26 AM
You could start with parallel reduction, there is a nice tutorial in glsl here:
http://www.mathematik.tu-dortmund.de/~goeddeke/gpgpu/tutorial2.html
http://www.mathematik.tu-dortmund.de/~goeddeke/gpgpu/tutorial2.html






