ItsKorin / Godot-Post-Process-Plugin

A simple godot 4.2 plugin that adds shader based "post processing"
MIT License
257 stars 18 forks source link

!!DISCLAIMER!!

Due to certain stuff happening in my life, i cannot maintain this project by myself, at least not right now. if you'd like to become a maintainer, please contact me thru my email: korin@itskorin.online or by creating a new Issue

Worm regards, Korin.

Some more info

Is this project abandoned? I will not be archiving this repository as i am NOT abandoning it, im just taking a break, sadly.

Post Processing Plugin

An add-on for Godot 4.2, available in the Godot Asset Library.

After moving from Unity to Godot in late 2019, I've felt like there was a lack of post-processing tooling. In February 2024 I decided to make and publish this simple add-on.

Features:

Effects:

Planned Features:

Basic Use:

Simply add the custom PostProcess node to the scene tree directly or through code. Set the "Configuration" property of the PostProcess to a PostProcessPreset (either pre-made or instantiated on-the-spot) and run the game. The add-on uses some simple "Screen Space" shaders to apply the desired effects.

image
image
image

Loading a preset:

image

Creating an in-place preset:

image

Adding changes only through code:

All values can be modified during runtime and the changes will be applied immediately. This applies to on/off states as well as numbered parameters. All effects can be applied in parallel and work together well.

(NOTE: Effects are applied on rendering layers: 99-120, so i suggest putting UI above 120 and anything else like player, world etc. under 99!)

Changing Effects Through Code.

In this example, we enable/disable ScreenShake!

extends Node3D

func _process(_delta) -> void:
    # Check if Screen Shake is enabled
    if $PostProcess.configuration.ScreenShake:
        # Change the Screen Shake Power by 0.1 each frame
        $PostProcess.configuration.ScreenShakePower += 0.1

        # if Screen Shake Power is bigger than 2, change it back to 0!
        if $PostProcess.configuration.ScreenShakePower >= 2:
            $PostProcess.configuration.ScreenShakePower = 0

    # if key T is pressed, Toggle Screen Shake
    if Input.is_key_pressed(KEY_T):
        if $PostProcess.configuration.ScreenShake:
            $PostProcess.configuration.ScreenShake = false
        else:
            $PostProcess.configuration.ScreenShake = true

This also works with other effects like: ASCII, Blur, ChromaticAberration, FishEye, etc...

Contributors:

Some Screenshots:

Normal: Godot_v4 2 1-stable_win64_4nCuRDZEv7 ASCII: Godot_v4 2 1-stable_win64_7GbIuOJMaA Chromatic Aberration: Godot_v4 2 1-stable_win64_jjyidzYH5b Vignette: Godot_v4 2 1-stable_win64_sHuRFKLWgJ Glitch: Godot_v4 2 1-stable_win64_nf9MvEGLIF Outline: Godot_v4 2 1-stable_win64_zEyjScQtmE Grain: Godot_v4 2 1-stable_win64_mgGj2yIxPM