Another, very similar problem, so i'm adding to same thread. Passing arguments in this fashion "
c.rgb = vec3((c.r+c.g+c.b)/3.0);" causes error when generating HLSL "
error X3014: incorrect number of arguments to numeric-type constructor".
Workaround: float bw = (c.r+c.g+c.b)/3.0;
c.rgb = vec3(bw, bw, bw);
Tip: in some cases division by 4 creates luma closer to original. Even better dividing channels separatedly with ratios R=0.2 G=1 B=0.1, that's because human eye perceives most of green color and least of blue. This also opens doors for more creative bw conversions, which used in photography by adding color filters on camera lenses or in post production.