shader_type canvas_item; void fragment() { float v = (COLOR.r + COLOR.g + COLOR.b) / 3.0; COLOR.r = v; COLOR.g = v; COLOR.b = v; }