If you had a fbo with 3 fullscreen render textures attached, with an image in two of them, which would be the better option to combine them, performance wise. Im thinking 2 would win in flexibility and performance.
- Set one of them as the target and fullscreen blend (in place) the other over top.
- Set the third as the target, combine the other two using a simple shader.
The result of combining will be used again for other work. Not need atm to preserve the two original images.
I havent done either yet, just want some feedback based on others experience.
In my deferred engine I ended up running a shader purely becuase of the extra flexibility it offered (in other words I could something else which blend could not).
Blending is carried out by dedicated h/w so I’d expect it to be more optimal.
Having said that, I hardly think this is going to the frame limiting step for your entire application, so on that basis I don’t think its going to matter either way IMHO.
I’d also vote 1 for performance but would prefer 2 for flexibility; if it’s fast enough then it’s fast enough and I’d take a slight drop as an acceptable tradeoff.