I am newbie writing a post-processing code for mobile devices, and asking some trivial, conventional solution for a specific problem.
AFAIK, post-processing in OpenGL is trivially done with FBO bound to a texture. Anyway, target screen size is usually not square and non-POT(power-of-two) numbers, while texture size needs to be the POT numbers. For example, iPhone 4 screen size is 640x960 pixels. Because all textures need to be POT sized, texture size for post-processing should be 1024x1024 to cover all the pixels. But in this case, over half of the pixels are just wasted. It really feels bad to me. Because simply wasted amount is huge.
Of course I can use smaller 512x512 texture if the post-processing doesn't need to be pixel-perfect. But still, I waste large portions of memory if I keep aspect-ratio. I can fill the texture by adjusting aspect-ratio, but in this case, we need to adjust fragment shader algorithms to get correct result.
Here're my questions.
If I need pixel-perfect post-processing, should I use larger texture which wasting large portion of it? Is this trivial? Or is there better solution? (For example, binding multiple small texture patches to a FBO.)
If I use smaller texture, what is trivial method to handle the aspect-ratio issue? Just use only small portion of the texture keeping aspect-ratio? Or adjust the fragment shader algorithm?