| layout(binding=0) texture2D tex; | |
| half4 desaturate(half4 color) { | |
| color.rgb = half3(dot(color.rgb, half3(0.22, 0.67, 0.11))); | |
| return color; | |
| } | |
| void main() { | |
| if (sk_GlobalInvocationID.x < width(tex) && sk_GlobalInvocationID.y < height(tex)) { | |
| write(tex, sk_GlobalInvocationID.xy, desaturate(read(tex, sk_GlobalInvocationID.xy))); | |
| } | |
| } |