Added filter rgb_uv_distort.gdshader and improved greyscale.gdshader

This commit is contained in:
ChaoticByte 2024-06-19 14:50:43 +02:00
parent 00bac825a0
commit e18fd7a14e
No known key found for this signature in database
3 changed files with 16 additions and 4 deletions

View file

@ -0,0 +1,11 @@
shader_type canvas_item;
const float strength = 0.1;
void fragment() {
vec2 uv = UV;
float b = (COLOR.r + COLOR.g + COLOR.b) / 3.0;
uv.x = mix(uv.x, b, strength);
uv.y = mix(uv.y, b, strength);
COLOR = texture(TEXTURE, uv);
}