How can I simulate a CRT display? (2D Filter)

How would I go about simulating my own CRT effect via 2D filters. Like the rasteriser banding effect, the delayed updating, the decreased resolution, and the “bloated” television look. This would have to be written via a Python script.

Oh, and on a seperate note, are there any sites useful to teaching beginners like me on how to do 2D Filters? I know Wikibooks on the old BGE had some, but they are outdated, and may not work.


“glsl filters” , “pixel shaders” = “fragment shaders” = 2d filters , “vertex shaders” = python

“online glsl”

“VHS opengl filter” … etc etc … THEN you will come with a precise question people will be eager to answer to.

Come with something (findings, where you stuck, wondering why this or that, …) before spamming random questions and flooding the forum. It’s not that’s really a problem in itself , but are you aware of all this or … ??

You can take any basic existing upbge 2d filter and deconstruct it to its simplest expression : make the screen a single color or multiply the pixel colors with red … start with that . We can help you debug it if any problem but you will probably succeed doing it yourself.

Well, here it is

uniform sampler2D bgl_RenderedTexture;

void main(void)
  vec4 txc = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st );
  vec3 clr = vec3(txc) ;  

  vec3 red = vec3(1.0, 0.0, 0.0) ;

  vec3 combo = clr * red   ;
  gl_FragColor = vec4( combo , 1.0)  ;   
1 Like

I made a VHS post-process shader a while back for legacy UPBGE.

I can port it to current UPBGE as well (I did in the past, but then deleted it when I was migrating hard-drives).

Any other shaders you find for example at ShaderToy can most likely also be converted for UPBGE usage.

1 Like