pub const BLACK_AND_WHITE: &str = "// Gray from a weighted sum of the channels in linear light, encoded again; the default\n// weights are the BT.709 luminance.\nfn effect(_uv: vec2f, src: vec4f) -> vec4f {\n let rgb = builtin_straight(src);\n let weights = vec3f(params.red, params.green, params.blue);\n let gray = builtin_encode(clamp(dot(builtin_decode3(rgb), weights), 0.0, 1.0));\n return builtin_output(mix(rgb, vec3f(gray), params.amount), src.a);\n}\n";Expand description
Built-in black-and-white channel mixer body.