Is there a way to "shift" a line of pixels to one side?

I’m working on a game that seems like a standard Bomberman clone but something seems off so I want to every now and then make a “glitch” effect appear on screen for just a split second. Is there something I could look at to achieve this? (Quick image to try and illustrate what I mean)

Sorry if I missed something, this is my first time posting here and I have no clue what info you guys need to know to help me. If I missed something please tell me!

I think you could probably achieve this with shaders but I’m not good at shader programming so I can’t help with that. What you could also do is that you render that small, specific part of your game to a rendertarget and display that rendertarget texture with a bit shifted position on top of your main screen. This would not actually shift the pixels but creates that illusion.

Here is a great introduction to rendertargets

I would advise against rendering to a texture if you don’t absolutely have to (such as for compositing FX). A pixel shader may be able to accomplish what you want to do, just be aware that if you want cross-platform, you’ll be working with an earlier version and may be forced to work with float texture coordinates from 0.0 to 1.0, which, if you’re used to working with pixel coordinates and integers, takes some getting used to.

Could you maybe explain why you are against rendering to texture? I am using that in my project in some places and I wonder what the reason might be, maybe I need to change some things too.