masking shader snesmocha July 21, 2021July 21, 2021 Report credits to scarm for finding it, thanks m8 Shader codeshader_type canvas_item; void fragment(){ COLOR = texture(SCREEN_TEXTURE, SCREEN_UV); COLOR.a = texture(TEXTURE, UV).a; } Live Preview
How can I do update for this shader on Godot 4.1?
shader_type canvas_item;
// Declare screen texture with proper hint
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture;
void fragment() {
// Sample screen texture and current texture
COLOR = texture(SCREEN_TEXTURE, SCREEN_UV);
COLOR.a = texture(TEXTURE, UV).a;
}