Thanks for reply. In fact, I got a method which can handle this question, but not efficent. My method is :
split the quad texture into 4 pieces like that
And I write a shader to render a quad which equal to the 1st pieces, with sampling 4 times for each 4 pieces. Output the average of the 4 sampling values into another quad texture which size is half of the origin one ( area is quater 1/4). After some steps, the sizes of texture are 1x1. So I get the result.
But this method is too slow to be not suit for my need. I wish that someone can teach me some more efficient method. So I post this thread.
Thanks for reading