forked from: pbjLabratory Lite # Circle Transition Shader
RGB値の最大・最小を入力し、その条件にあてはまるか否かで2値化するフィルタです。
*
pbkソース
<languageVersion : 1.0;>
kernel ThresholdFilter
< namespace : "Your Namespace";
vendor : "Your Vendor";
version : 1;
description : "your description";
>
{
input image4 src;
parameter float3 max
<
maxValue : float3(255);
minValue : float3(0);
defaultValue : float3(200);
>;
parameter float3 min
<
maxValue : float3(255);
minValue : float3(0);
defaultValue : float3(50);
>;
output pixel4 dst;
void
evaluatePixel()
{
//dst = sampleNearest(src,outCoord());
float3 p;
p = sampleNearest(src,outCoord()).rgb;
p *= 255.0;
if (
p.r < min.r || p.r > max.r ||
p.g < min.g || p.g > max.g ||
p.b < min.b || p.b > max.b
)
{
dst.a = 0.0;
}
else
{
dst = float4(1.0, 1.0, 1.0, 1.0);
}
}
}
* **このテンプレートはzahirさんの作品です**
- forked:1
- favorite:12
- lines:1015
- license : MIT License
- modified : 2010-02-26 10:21:00
阀值图片生成
bitmap threshold
image,manipulationimage manipulation: black and white
YinSun
:
pixel Bender效果3


