Fragmented/src/presets/shaders/greyscale.gdshader

11 lines
189 B
Text
Raw Normal View History

2024-06-04 18:31:04 +02:00
shader_type canvas_item;
void fragment() {
vec4 tex = texture(TEXTURE , UV);
float b = (COLOR.r + COLOR.g + COLOR.b) / 3.0;
COLOR.r = b;
COLOR.g = b;
COLOR.b = b;
2024-06-04 18:31:04 +02:00
COLOR.a = tex.a;
}