wonderfl - build flash online

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さんの作品です**

Nicolas Nicolas

add to favorites

Embed

Code Fullscreen

Favorite by

shangmingwen shangmingwen.. :

阀值图片生成

hacker_rs10vazy hacker_rs10v.. :

bitmap threshold

goliatone goliatone :

image,manipulationimage manipulation: black and white

YinSun YinSun :

pixel Bender效果3

Tags

sectKeywords

Forked

ページの先頭へ戻る