View Full Version : FBO with phong and multi-pass blur shader

08-05-2014, 12:53 AM
Hello forum,

I want to get the following effects from the usage of multiple shaders. I want to have a rotating teapot model on each face of thhe box primitive and this teapot model goes through the phong shader. I got the following output. Please Check the following link:


I hope that you have seen the output of the above link.

Now i want to take a bit further. I want to have a real-time blur effect over the rotated teapot model. Any suggestion on how i should proceed?

This is how i thought. The part that i have done so far is basically rendered to the fbo that goes through the phong shader and the resultant output is bind to each of the faces of the box primitive.

Now i get the texture image from the output of the first fbo texture attachment and pass it through a blur shader in the x-direction . The output is rendered to second fbo.

The output of the secong fbo is again passed through another blur shader in the y-direction and rendered to the last fbo.

At last i would bind the texture from the last fbo to each face of the box primitive and then i should see the blurred animating teapot model on each face of the box.

I have tried along the line i thought and i am not getting what i assumed. I am getting a still teapot model on each face of the box instead of a blurred rotating teapot model on each face of the box.

Any thoughts folks? I must to missing some basic concept here and i request your hints here.


carsten neumann
08-05-2014, 07:27 AM
Your description sounds reasonable to me, you gonna have to start the debugger and find the bug(s) ;)
My guess would be that there is some mixup in which FBO is active for rendering or perhaps you have accidentally bound a texture for reading and writing at the same time.