Glitch Shader Trigger

Hello all.
I’d like to have a console.log() or some kind of trigger when glitch shader activates itself.
Not when he is rendered to the screen, but actually when the glitch appears.
I’ve been reading the js file of the shader in the Three.js folder and it appears to have a function called generateTrigger, can someone help me on this?
Best regards, Luis

The glitch starts when the following if condition in GlitchPass.render() is true:

I guess this would be the place for your log.

1 Like

Thank you very much for the fast response Mugen.
It works perfectly.
Best, Luis

1 Like