Screen Processing: One shot or batching

Hi OGLers,

I have been working on a graphics application involving blooming, motion blur and something, kinda image processing in which a quad is passed to a VS and input is processed in a FS, then put them together at the end of a frame.

For now I put all stuff in a single post-processing shader, something like:

uniform sampler2D bloom;
uniform sampler2D motion;
uniform sampler2D more_tex;
[shader codes to combine all effects]

The approach is ok, fat and crowded though as all effects separate from one another reside within a single fragment shader. So I am thinking of batching the post-processing jobs, something like:

bloomEffect.render(fb1, fb2, ...);
swap(fb1, fb2);
motionBlurEffect.render(fb1, fb2, ...);
swap(fb1, fb2);
[more cpp codes]

I notice all these could be packed in a job queue so it is nice for me to manage them all. What I concern is whether the batching approach is much slower than one-shot approach, or the lag caused by batching(like unnecessary VS in/out) is acceptable.

I saw someone posting about similar issue but my question is not answered. What you guys actually do in your applications? Thanks in advance!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.