davisbrandon02 / motion-blur-godot-4.0

A motion blur plugin created by Bauxitedev, ported to Godot 4.0
MIT License
23 stars 2 forks source link

Update for Godot 4.0.stable, improve demo scene #3

Open Calinou opened 1 year ago

Calinou commented 1 year ago

Preview

Epilepsy warning: Video contains flashing due to fast camera rotation.

https://user-images.githubusercontent.com/180032/226503817-38490e73-b87d-40e0-896d-cd5b365ac41a.mp4

jayypluss commented 1 year ago

Thanks for this, I'm using your version of the files. Do you happen to know if it's possible to exclude something from the shader processing? I'm asking this cuz my game is third person and the shader makes the player mesh blur too much, I was wondering if I could prevent the player mesh from blurring.

Calinou commented 1 year ago

Do you happen to know if it's possible to exclude something from the shader processing? I'm asking this cuz my game is third person and the shader makes the player mesh blur too much, I was wondering if I could prevent the player mesh from blurring.

Other than making a specific material use Depth Draw mode set to Never, no. This shader is screen-space and affects the entire viewport as a result.

Another workaround may be to change the motion blur shader so it modulates its intensity based on depth. This would cause all nearby pixels to not exhibit any motion blur though.