What i need to do:
- Blur the selected texture and pass the texture to another effect for postprocessing.
- Notice that i want one texture passed all over.
How do i want to do this:
- Bind the FBO ( with texture to be blurred attached as colorbuffer )
- Change the FBO viewport size to match the texture size
- Enable the shader
- Bind the texture
- Render viewport sized quad with the texture and output to that texture via FBO colorbuffer
- Unbind texture
- disable shader
- Disable fbo
- ...
- pass that texture to another effect..
What i have already done:
- A FBO with ColorBuffer attached ( the texture i want to blur ),
- The shader
- All the other reqd stuff..
What's the problem?
- When i want to blur texture and i bind that texture as a color buffer to my FBO, and then pass the texture via uniform to the shader while rendering to sample it (and blur), the results are not stored. Seems like FBO can't have the same texture stored as output and sample it at the same time ( kind of understandable ).
Question:
- Is this normal behavior ? How do i approach 'blur a selected texture' so that i can pass one texture over to another effect to work on it ?
I can imagine a 'dummy' texture within the effect class to which FBO renders to and then it gets copied to a texture that was requested to be modified.. Any better option ?
Thanks for shedding a bit of light on this, i think i need some logic help in here.