#include <acknex.h>
MATERIAL *mtlEffect =
{
effect = "
float4 vecCycle;
texture TargetMap;
sampler ColorSampler = sampler_state { Texture = <TargetMap>; };
float4 PS ( in float2 inTex: TEXCOORD0 ) : COLOR0
{
float2 Coord = inTex.xy * vecCycle.y;
float4 Color1 = tex2D ( ColorSampler, Coord );
Color1.a = 1.0f;
return Color1;
}
technique blur
{
pass p0
{
VertexShader = null;
PixelShader = compile ps_2_0 PS();
}
}
";
}
function main ()
{
video_set(256,256,32,2);
wait(1);
FONT *fntArial = font_create ( "Arial#30" );
STRING *strText = str_create ( "ABCDEFGHIJKL" );
PANEL *panSource = pan_create ( "", 1 );
panSource.size_x = 256;
panSource.size_y = 256;
pan_setstring ( panSource, 0, 0, 0, fntArial, strText );
pan_setstring ( panSource, 0, 0, 30, fntArial, strText );
pan_setstring ( panSource, 0, 0, 60, fntArial, strText );
pan_setstring ( panSource, 0, 0, 90, fntArial, strText );
set ( panSource, SHOW );
panSource.target_map = bmap_createblack ( 256, 256, 32 );
PANEL *panDestiny = pan_create ( "", 1 );
panDestiny.bmap = bmap_createblack ( 256, 256, 32 );
set ( panDestiny, SHOW );
while ( !key_esc )
{
bmap_process ( panDestiny.bmap, panSource.target_map, mtlEffect );
wait(1);
}
sys_exit ( NULL );
}