Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
pRoJect45yt

Is it possible to make the screen show static/glitch effects?

Question

5 answers to this question

Recommended Posts

  • 0

In GZDoom the glitching can be made using glsl shaders, and aplying it to the screen as a post process scene shader (GLDEFS -> Hardware Shaders part: https://zdoom.org/wiki/GLDEFS).

 

You will also need a ZScript EventHandler overriding the RenderOverlay function to apply the shader, like this (in a ZScript lump):

 

class ShaderHandler : StaticEventHandler { 
         override void RenderOverlay(RenderEvent e) { 
                 PlayerInfo p = players[consoleplayer]; 
                 Shader.SetEnabled(p, "ShaderName", true); 
        }     
}

 

The static can be done also with shaders, but more easily you can just stamp a static image in the screen using hudmessage, it allows you to regulate the alpha and all

Share this post


Link to post
  • 0

Im very confused as to what any of that means. Will someone need the Handler and Shaders to play the wad I made it for?

Share this post


Link to post
  • 0
11 hours ago, ramon.dexter said:

Yes, they will need the handler. 

that helps but i have no clue what im supposed to do or how to approach this. 

Share this post


Link to post
  • 0

So, it's not an easy task. You need a shader code, gldefs definition of the shader code, zscript eventhandler to trigger the shader and optionally a cvar to be able to turn the effect on and off. 

 

I'm not good at explaining things. Here, take a look at an example shader implementation. In this case, crt effect.

 

https://github.com/jorisvddonk/GZDoom_CRTShader

 

Also take a look here:

https://forum.zdoom.org/viewforum.php?f=103

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×