Chromakey for Godot 4.3

chromakey shader for filling the sprite.

Aplicar a la textura que debe tener Chromakey.

Shader code
shader_type canvas_item;

uniform vec4 backgroundColor : source_color = vec4(0.0, 1.0, 0.0, 1.0);

void fragment() {
    vec4 texColor = texture(TEXTURE, UV);

    if (texColor.a == 0.0) {
        COLOR = backgroundColor;
    } else {
        COLOR = texColor;
    }
}
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from BananaBoy

Delete chromakey for Godot 4.3

Pixel Water for Godot 4.3

Related shaders

Delete chromakey for Godot 4.3

Fnaf / Clickteam perspective (displacement) – Godot 4.2

Glitch Effect Shader for Godot Engine 4

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments