I am facing an issue with the implementation of three.js post processing. I have chosen the glitchpass effect and imported all the necessary libraries, but unfortunately, the effect is not working as expected. Despite no errors being shown in the console, nothing seems to happen.
this.renderer = renderer;
this.composer = new THREE.EffectComposer( renderer );
this.composer.addPass( new THREE.RenderPass( this, camera ) );
this.glitchPass = new THREE.GlitchPass();
this.glitchPass.renderToScreen = true;
// this.giltchPass.goWild = true;
this.composer.addPass( this.glitchPass );
Additionally, here is the snippet for the animate loop:
this.composer.render();
I am perplexed as to why the code is not functioning as intended. To investigate further, I duplicated the code directly into an HTML file (test.html).
Interestingly, the exact same code works flawlessly when placed within the HTML document without using inheritance or 'this' references.
Do you have any insights or suggestions on how to tackle this issue?
Thank you for your help.