Giter VIP home page Giter VIP logo

godot-motion-blur's Introduction

Godot Motion Blur

This is a camera motion blur shader for Godot. It uses the linear and angular velocity of the camera to calculate a velocity vector per pixel, and then blurs that pixel accordingly. The velocity is automatically calculated from the way the camera moves and rotates, so it works for pretty any kind of camera animation you can think of. It can produce linear blur, angular blur, zooming blur, and any combination of them, depending on the camera's movement.

It looks like this:

Motion blur

Here's a video of it in action.

How to use it

It's really easy to use in your project! Simply:

  1. Download the repository as zip and extract it.
  2. Copy the motion_blur folder into the root folder of your project.
  3. In the scene of your game, select your camera node, and then click the chain icon above the scene tree to instance a scene, then select the motion_blur.tscn scene file.
  4. That's all!

Limitations/Known Issues

  • Only works for camera movement. When something else in the world moves it won't be blurred.
  • Additionally, when the camera moves, and another object moves at the same speed of the camera, that object will be wrongly blurred. So e.g. in a racing game you'll notice the car will be blurred in the same way as the environment. You could work around this by enabling the Transparent flag in the material of the car, and setting the Depth Draw Mode to Always (since transparent objects are not blurred - see below).
  • Transparent objects will not be blurred (since this effect uses the depth buffer, but transparent objects aren't drawn to he depth buffer, so they aren't detected)

License

MIT

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.