Jump to content
  • 0

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


pRoJect45yt

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
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

Edited by ramon.dexter

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...