I’m having difficulties to make ofxPostGlitch work in my project. The example provided by the addon runs perfectly well after updating the project to OF 0.9.3 with the project-generator. Later in my project as soon as I toggle the shader with glitch.toggleFx(OFXPOSTGLITCH_CONVERGENCE); the screen turns completely gray. I’m currently using Xcode 7.3.
Any idea why that might be @valillon? I’ve got all the ofxPostGlitch effects working fine with 0.9.3 and xcode 7.3. I’ve changed ofRect to ofDrawRectangle but that shouldn’t make a difference really.
Hi @clem, the example in ofxPostGlitch is working perfectly fine. It was not working in my implementation. Concretely it stopped working after adding a shader at the beginning of my ofFbo view:
// Definition of controlScenes.draw();
void myControlSceneClass::draw()
{
background.draw(); // This a ofShader drawn inside an custom class' method
camera.begin();
... // some drawings here
camera.end();
}
I do not why but it seemed that the line in ofxPostGlitch.cpp:
did not feed properly ShadingBuffer by simply drawing ofDrawRectangle(). It displayed a gray rectangle across the entire screen. Instead I forced to draw/buffer targetBuffer (targeted view) into ShaderBuffer and it worked out !!