patriciogonzalezvivo/ofxFX — pull request #18 by OliverUv (2014-03-23 08:54:28+00:00)
Title: Do not corrupt textures between FBOs

Previously, if we set a texture (e.g. tex0) and some parts of it were transparent, all the transparent things would have been changed when doing fxobject[0].draw(...). The transparent parts would have had their alpha channel mixed with the black color due to the ofClear(0,0) call in setTexture.

Previously, textures would similarly lose their proper transparent looks when a shader was applied. This is also fixed.

Now we no longer modify transparent textures. :) Non-transparent textures still look and get modified like they used to.

[Here is a proof of concept](https://github.com/OliverUv/openframeworks_tests/tree/master/fxTest/src) showing how the behavior was bugged before this patch.

Took such a long time to fix this, but now I can use ofxFX for advanced things and I learned a lot about alpha rendering in the process! : D