Pigment/examples/greyscale.gdshader

9 lines
136 B
Text
Raw Normal View History

2025-10-10 22:05:07 +02:00
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;
}