当我运行以下像素弯曲代码时:
input image4 src;
output float4 dst;
// How close of a match you want
parameter float threshold
<
minValue: 0.0;
maxValue: 1.0;
defaultValue: 0.4;
>;
// Color you are matching against.
parameter float3 color
<
defaultValue: float3(1.0, 1.0, 1.0);
>;
void evaluatePixel()
{
float4 current = sampleNearest(src, outCoord());
dst = float4((distance(current.rgb, color) < threshold) ? 0.0 : current);
}
我收到以下错误消息:
错误:(第 21 行):':':错误的操作数类型不存在操作':',它采用'const float' 类型的左操作数和'4-component vector of float' 类型的右操作数(或有是不可接受的转换)
请指教