Suppose we have a texture of size 2560*240 that we want to render in an screen area of 320*240 pixels. So, each screen pixel is overlap of 2560/320=8 texture samples. I want the OpenGL shader be able to choose maximum color value among these 4 texture samples. How can I achieve this?
Next step is to downsample a texture of size 2560*240 to 640*480 screen, in such a way that each two consecutive screen pixels cover minimum and maximum of 8 texture samples that fall in two consecutive screen pixels. So, user can always spot minimum and maximum color values if texture minification happens.