AIR + AS3을 사용하여 Android 앱을 쓰고 있습니다. 픽셀 벤더 파일은 GPU 모드에서 not supported이므로이 크로마 키 필터를 순수 AS3으로 변환하려고합니다. 모든 제안, 도구 또는 도움을 주실 수 있습니다 :픽셀 벤더를 AS3으로 변환
<languageVersion : 1.0;>
kernel DifferenceKey
< namespace : "com.quasimondo";
vendor : "Quasimondo";
version : 1;
description : "A simple difference key for chroma keying";
>
{
input image4 src;
output pixel4 dst;
parameter float3 keyColor;
parameter float tolerance
<
minValue: 0.0;
maxValue: 3.0;
defaultValue: 0.02;
>;
parameter float ramp
<
minValue: 0.0;
maxValue: 1.0;
defaultValue: 0.005;
>;
parameter float gamma
<
minValue: 0.0;
maxValue: 10.0;
defaultValue: 1.00;
>;
void
evaluatePixel()
{
dst = sampleNearest(src,outCoord());
float diff = length(dst.rgb - keyColor);
if (diff < tolerance)
{
dst.a = 0.0;
} else if (diff < tolerance + ramp)
{
dst.a = pow((diff - tolerance)/ramp, gamma);
}
}
}
예
Feathers UI
Starling
. AGAL 셰이더가 모바일에서 작동하는지는 알 수 없습니다. (예 가능성 있음) – Vesper예, 작동합니다. Starling 필터는 AGAL 프로그램이며 모바일에서도 놀라 울 일을합니다. – jpop
감사합니다. –