Godot CRT Shader
A downloadable asset pack
For more assets like this, follow my itch.io page!
A simple Godot shader that simulates CRT Displays.
The shader is available for both Godot 3.x and Godot 2.x versions.
You can check the source-code on the GitHub repository: https://github.com/henriquelalves/SimpleGodotCRTShader/tree/master
For Godot 3.x
You can simply copy the CRTShader.shader code to use on your project; to set it up, just use it in a an TextureRect with a white texture. Your game must be running 'under' the node for the CRT Shader to have any effect. This project comes with an example on how you can use the shader.
All relevant variables and CRT effects can be tweaked using the shader Uniform Variables.
For Godot 2.x
A tutorial on how to install the Shader on Godot 2.x (YouTube): https://www.youtube.com/watch?v=ydrC-3Uy-aY&feature=youtu.be
How the Shader works
This Shader is made of 3 main components:
- Distortion: It is the effect that causes the '3D'-like monitor effect.
- Color Bleeding: Creates a small 'color bleeding' on the Red and Blue channel of close pixels.
- Scanlines: Creates a strip of black, alpha lines that moves constantly on the screen.
The effects are based on these articles:
- Distortion: http://www.geeks3d.com/20140213/glsl-shader-library-fish-eye-and-dome-and-barrel-distortion-post-processing-filters/2/
- Color Bleeding and Scanlines: http://www.magneticrealms.com/posts/2014/02/03/a-crt-filter-without-shaders/
Credits
The screen sample was made by 'ansimuz' - the art is in public domain (CC0), and can be found in: http://opengameart.org/content/country-side-platform-tiles.
Character was made by EdwoodNigma - the spritesheet is in public domain (CC0), and can be found in: https://opengameart.org/content/platformer-character-0
Download
Click download now to get access to the following files:
Comments
Log in with itch.io to leave a comment.
for those who are going to use it in godot 4, just copy the "addons/crt_shader/CRTShader.shader" and add the following line along with the other variables:
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
so umm godot 4 please?
please make a version for godot 4
It's amazing
This works great! Reminder to set the shaders as children of a canvas layer to get the effect following the camera.