check GPU max texture size and downsample on the fly