It seems a good way to go when the process has nothing to do with the render/panels colors and so.
MATERIAL *mtlEffect = mtl_create ();
mtlEffect.effect = "myeffect.fx";
PANEL *panSource = pan_create ( "", 1 );
...
panSource.bmap = bmap_createblack ( panSource.size_x, panSource.size_y, 32 );
set ( panSource, SHOW );
...
while ( 1 )
{
bmap_process ( panSource.bmap, NULL, mtlEffect );
wait(1);
}
Otherway I know two other similar ways to go.
If you want to process just the panels, render them over a render target and show it throught an other panel with a bmap_process.
MATERIAL *mtlEffect = mtl_create ();
mtlEffect.effect = "myeffect.fx";
PANEL *panSource = pan_create ( "", 99 );
...
panSource.render_target = bmap_createblack ( panSource.size_x, panSource.size_y, 32 );
set ( panSource, SHOW );
PANEL *panDestiny = pan_create ( "", 1 );
panSource.bmap = bmap_createblack ( panSource.size_x, panSource.size_y, 32 );
set ( panDestiny, SHOW );
...
while ( 1 )
{
bmap_process ( panDestiny.bmap, panSource.render_target, mtlEffect );
wait(1);
}
If you want process the camera too, you can go like in the example above and include the camera render target in a material skin, or you can enlarge the render chain with a
process_target view.
PANEL *panSource = pan_create ( "", 1 );
...
panSource.render_target = bmap_createblack ( panSource.size_x, panSource.size_y, 32 );
set ( panSource, SHOW );
MATERIAL *mtlEffect = mtl_create ();
mtlEffect.effect = "myeffect.fx";
mtlEffect.skin1 = panSource.render_target;
VIEW *camFinal = view_create ( 1 );
camFinal.material = mtlEffect;
set ( camFinal, SHOW | PROCESS_TARGET | CHILD );
camera.stage = camFinal;
In both cases, you'll need to check the texture sampler sources of the shader.
hope it helps,
salud!