Thank you guys for your help, I really appreciate it. I think I'm almost there (I'm pretty new to shader programming). Here's my current process:
Code:
//bmap for the unprocessed screen
BMAP* firstScreen;
// a postprocessing view
VIEW* postprocessor1 = { material = mtl_pp_1; flags = CHILD | PROCESS_TARGET; }
...
//in main
camera.bmap = firstScreen;
camera.stage = postprocessor1;
mtl_pp_1.skin1 = firstScreen;
...
//in the .fx file
Texture mtlSkin1;
sampler2D mtl_sampler = sampler_state { texture = <mtlSkin1>; };
float4 pp_effect( float2 Tex : TEXCOORD0 ) : COLOR0 {
float3 Color = tex2D(mtl_sampler, Tex.xy).xyz;
return float4(Color,1.);
}
This should simply display the saved bmap, but instead gives an entirely black screen. I assume mtl_sampler is empty. Where might I be going wrong?