Sampler size

Say I’d like to add some nice shader effect to a small piece (like 50*50 pixels) of the framebuffer or a fbo. How should I do this?
Should I attach the fbo texture as a whole to the shader?

Related: Is there a difference in performance between binding a small area (with some subimage function) and binding the whole image?

Thanks :slight_smile:
ps. Can the accumulation buffer be sampled alike a fbo-texture?

Is there a difference in performance between binding a small area (with some subimage function) and binding the whole image?

One of these requires a texture copy. The other doesn’t. Doing something is always more expensive than doing nothing.

Unless you’re not using render-to-texture, there is nothing to be gained by copying a portion of a texture from the frame buffer.

Can the accumulation buffer be sampled alike a fbo-texture?

No.

Ok, thanks :slight_smile:

So the size of the texture has no effect on the sampling performance.
It just feels slow to bind a big (2048*1024) fbo just to change a small area.
The set-up would be:
render a small area (quad), bind fbo(which contains the whole soon-to-be-shown scene :)) and use fancy-effect shader which samples from the fbo.

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