1layout(binding=0) texture2D tex; 2 3half4 desaturate(half4 color) { 4 color.rgb = half3(dot(color.rgb, half3(0.22, 0.67, 0.11))); 5 return color; 6} 7 8void main() { 9 if (sk_GlobalInvocationID.x < width(tex) && sk_GlobalInvocationID.y < height(tex)) { 10 write(tex, sk_GlobalInvocationID.xy, desaturate(read(tex, sk_GlobalInvocationID.xy))); 11 } 12} 13