Original Post
Hi, I'm trying to create a flow effect via using Frame Buffer Objects, but I can't seem to get any worthy results. Here is the process I am following: 1) Create the FBO Object 2) Create 2 blank textures 3) Use glFramebufferTexture2DEXT() to set Texture 1 as the FBO render target 4) Draw glowing object to texture 1 using FBO 5) Convert projection into orthographic projection 6) Use glFramebufferTexture2DEXT() to set Texture 2 as the FBO render target 7) Use glBindTexture() to set Texture 1 as the current texture 8) Draw a screen-sized quad across the screen horizontally several times (shifting each time). The quad will be drawn with the image in Texture 1 (which should be an image of the glowing object drawn previously) 9) Disable FBO rendering so that I can now render to the default render target 10) Use glBindTexture() to set Texture 2 as the current texture 11) Draw a screen-sized quad across the screen vertically several times (shifting each time). The quad will be drawn with the image in Texture 2 (which should now be a horizontal blur of the single glowing object in Texture 1). As this final step is performed, it is blended with the scene which was originally drawn in the default backbuffer, NOT the FBO. The FBO is only used for the blur calculation. There are a few things about the above method: 1) The blur sucks. Even just examining a horizontal blur, it totally sucks. As you zoom further away from the object the blur looks more and more like a long strip of object copies. The blur also does not become smaller as you move further away 2) If I include steps 6 through 9, I get absolutely no output. For some reason, using setting texture 2 doesn't work because nothing is being drawn. Note that if steps 6 through 9 are skipped, then in step 10 we will glBindTexture() on Texture 1, and not texture 2. I have a few questions: 1) When you change your render target in the FBO, do you have to re-do your projection and/or viewport, even if the viewport dimensions have not changed? (aka, the screen size is the same as the FBO texture size) 2) What reasons would the FBO have for not working when you actually process steps 6 through 9? In conclusion I would just like to mention that there is NOT much documentation on FBO's and I am very frustrated with that. I can't really figure out how the hell to use FBO's. I'm sure if I knew 100% how they worked I wouldn't be having stupid problems like this. Not to mention that I can't find any samples where a program uses 1 FBO to render to XX many textures. Any guidance would be greatly appreciated. Thanks!