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 Godot 4.x, Godot 3.x and Godot 2.x versions.
You can check the source-code on the GitHub repository: https://github.com/henriquelalves/SimpleGodotCRTShader/tree/maste
For Godot 4.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.
There is also a "CRTScreen" node enabled by the addon that sets some of the shader parameter variables for you automatically.
All relevant variables and CRT effects can be tweaked using the shader Uniform Variables.
For Godot 3.x
Same thing as Godot 4.x version, you just need to use the CRTShader.shader on a materia. There is no "CRTScreen" node available on Godot 3.x version.
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.
- Chromatic Aberrator: Creates a small 'color bleeding' effect on the Red and Blue channel of pixels of a given distance. You can tweak this effect on the borders of the screen.
- 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
Status | Released |
Category | Assets |
Rating | Rated 5.0 out of 5 stars (6 total ratings) |
Author | perons |
Made with | Godot |
Code license | MIT License |
Asset license | Creative Commons Zero v1.0 Universal |
Download
Click download now to get access to the following files:
Comments
Log in with itch.io to leave a comment.
Very good, I like it!
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;
Fixed! (just a year later)
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.