-> Use this texture in FS to compute the final result BIND here first texture (tex_1) filled above in the first render pass -> Write the result in texture COLOR_ATTACHEMENT0 (tex_1)įrameBuffer->GetTexture(GL_COLOR_ATTACHMENT1)->Bind() //tex_2 So I will have to enable GL_COLOR_ATTACHMENT0 and GL_COLOR_ATTACHMENT1 and bind the desired texture to the correct render pass as follow :įrameBuffer->GetTexture(GL_COLOR_ATTACHMENT0)->Bind() //tex_1
Is it possible to fill these 2 textures using the same FBO ? To do the job I need to render the first blur information (the one on Y axis) in a specific texture (let's call it tex_1) and use this same information contained in tex_1 as input information for a second render pass (for the X axis) to fill an other texture (let's call it tex_2) containing the final gaussian blur result.Ī good practice should be to create 2 frame buffers (FBOs) with a texture attached for each of them and linked both to GL_COLOR_ATTACHMENT0 (for example). I'm implementing in my program the gaussian blur effect.