7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible),
18,869
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: bmap_process effect on movie problem
[Re: BySharDe]
#404796
07/16/12 04:13
07/16/12 04:13
|
Joined: Jan 2012
Posts: 39
BySharDe
OP
Newbie
|
OP
Newbie
Joined: Jan 2012
Posts: 39
|
Here is my testing demo
#include <acknex.h>
#include <default.c>
STRING* file1 = "testing.avi"; //720*576
action myplay()
{
my.ambient = 100;
media_loop(file1, bmap_for_entity (my, 0), 100);
}
MATERIAL* mysunglass =
{
effect = "
Texture TargetMap; // source bitmap
sampler2D smpSrc = sampler_state { texture = <TargetMap>; };
float4 process_sepia(float2 Tex: TEXCOORD0): COLOR
{
float4 Color = tex2D( smpSrc, Tex.xy);
if(Tex.x < 0.2)
{
Color.a = 0.7;
}else
Color.a = 0.4;
return Color;
}
technique Sepia {
pass p1 {
AlphaBlendEnable = True;
PixelShader = compile ps_3_0 process_sepia();
}
}
";
}
void main()
{
fps_max = 25;
video_set(1280,960,24,0);
level_load("");
wait(1);
BMAP* origin = ent_create("black.bmp",vector(800,0,0),myplay);
PANEL* video_panel = pan_create(NULL,5);
video_panel.bmap = bmap_createblack(720,576,32);
set(video_panel,SHOW | OVERLAY);
while(1)
{
bmap_process(video_panel.bmap,origin,mysunglass);
wait(1);
}
}
|
|
|
Re: bmap_process effect on movie problem
[Re: BySharDe]
#404798
07/16/12 06:49
07/16/12 06:49
|
Joined: Jan 2012
Posts: 39
BySharDe
OP
Newbie
|
OP
Newbie
Joined: Jan 2012
Posts: 39
|
Alright! after several test, I now solve it.
bmap_process(video_panel.bmap,origin,mysunglass);
to
bmap_process(video_panel.bmap,bmap_for_entity(origin,0),mysunglass);
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|