Has anyone tried using an RGBA texture as both and output and input. I realise this is not advised but I wonder if it would be possible to use the R channel as the output while reading from the B channels. Technically it is feedback but I would have thought it could be possible if they were on separate color channels, using a glcolor mask to ensure B channel is not written to ?
As far as I am aware reading & writing to the same texture (FBO attachment) could result in undefined behavior (may return garbage data); to prevent this the attachment should only be a data source or target not both at the same time. I would recommend using two textures, i.e. fill the first texture with some data then set it as an input to the next stage in your pipeline and use the second texture as an output. If you only require one channel you can set the texture format to R8 which will give you a texture with a single 8 bit channel.
This reply was modified 1 week, 4 days ago by Shaun.