Giter Club home page Giter Club logo

simplegodotcrtshader's Introduction

SimpleGodotCRTShader

A simple Godot (v2.x) shader that simulates CRT Displays. Without Shader With Shader

How to install

Compatibility: Thank you MohabMohamed for porting the Shader to Godot 3.x! Both projects can be found on their respective folders. To test, remember to change the variable values on the shader script.

For Godot 2.x

You can use the shader by just copying the "CRTDisplayShader.shd" to your project (it's the Shader raw code). But if you don't know how to setup the shader material, you can just use the CRTViewportDisplay:

  1. Copy-paste the "CRTViewportDisplay" folder to your project.
  2. Open the "CRT.scn" on Godot Editor, and set the correct size of the viewport and the frames for your project display size.
  3. Add the main scene of your project as a child of the Viewport node.

The viewport will than render your project using the CRT Shader.

You can modify the values of the Shader using the Uniform Variables.

A tutorial on how to install the Shader (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.

All the effects have Uniform variables, so they can be controlled without changing the code.

The effects are based on these articles:

A shoutout for the Godot developpers group on facebook! I would be completely lost without you guys, haha.

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.

simplegodotcrtshader's People

Contributors

henriquelalves avatar mohabmohamed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.