How to make Glitch Effect in Spark AR

Hey, community, What’s up? I hope you all doing great out there♥

I’m thinking about how to create something similar to the glitch effect which is gonna apply to the user’s camera texture.

Of course, the first trick is to use a glitch overlay on the top of the camera texture, But in fact, I want to do this effect deeply integrated with the camera texture something like this :

I appreciate all your helps guys.

mmmh, I never did these per se but I’d say there are two ways I’d go about it :

1° use the Texture distortion Shader and create some glitch distortion maps, you could even make an animation sequence glitch effect and feed that to the distortion input

2° Use 2d Transform pack patches to modify and stretch certains parts of the cameraTexture by using alpha maps (possibly randomising it) to affect the different parts


Of course, That’s it.

I’ve marked Boris answer as the solution for now. Let us know if you have further question or found any problem while setting them up. Good luck with your project :smiley:

1 Like