Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hello! I really like this and I'm very interested in potentially implementing it in a future project. I am completely new to GMS2; last time I used any version of Game Maker was before GMS existed and I didn't know anything back then, either.

What I'm wondering is if it's possible to use this on select portions of the screen instead of the whole screen (or alternatively, if it's possible to apply this shader to a single background layer and build overtop of it with tiles unaffected by the glitching); what I want to do with this is something kinda similar (aesthetically) to the glitch rooms in Axiom Verge where parts of the screen appear to be corrupted. I may have use of this either way; it's awesome looking and may inspire me to do other things with it, but I'd just like to find out if this is even possible before I go ahead and get in over my head.

(+1)

The shader can be used on anything rendered by the GPU. In this case, the usual approach would be to render everything you'd like to have the effect applied to into a new surface, which you would then draw with the shader active. 

Thanks very much!

(1 edit)

I know it's a big ask, but if you know how to do this for GM2, would you mind demonstrating? You're probably a busy man, so I understand if you'd rather not.

Hi! There's a simple GMS2 example included in the project that demonstrates the usage of the shader with little code.

(1 edit)

I saw, it looks great! But I was wondering if I could apply it to only a single object. I'm new to coding and GM2, I managed to get it to draw onto a surface, but the surface seems to be acting as a sort of window looking into a glitch effect that is the size of an entire screen.

I asked on the Gamemaker 2 forums, but nobody seems to know how to apply it to a single object.

The goal was to have an enemy glitch when they're shot, and I really want to use your shader for it, since it has so many options!

So basically, the issue is that the edges are getting cut off, even though my surface that I created is bigger than the object I want to draw the shader over.

Upon further experimentation, I realize that the shader must have a solid color to draw over, even if the shader is applied to a greater area it will not glitch anywhere that is transparent. I can work around this, thank you for the amazing shader!

The shader is only meant to be applied on surfaces, though you might have luck with sprites, assuming they're on their own separate texture page and provided there's enough empty space around them for the various texture shifting effects to be properly rendered. Also, the shader will work just fine with or without standard alpha blending, there aren't any special requirements in regards to that.