Thanks for your patience JCL.

When the view.bmap is used in a panel, the view entity is indeed visible. However if the view.bmap is used as a skin in a view material for an PP effect, it is not.

This sample illustrates the problem myself and the others are having. Here I render the view with the view entity to a bitmap and pass the bitmap to the second view material as skin1. All the effect does is return skin1 to the screen. I expect the original view with the view entity to be displayed (two blobs), however the view entity is not visible (only one blob).


Code:
BMAP* camera_scene = "#1024x768x32";

ENTITY* blob = { type = "blob.mdl";  flags2 = SHOW; x = 150; y = 35; }

MATERIAL* mtl_ShowRt = 
{	
  skin1 = camera_scene;

  effect = "
  Texture mtlSkin1; 
  sampler OrgSampler = sampler_state { texture = <mtlSkin1>;};

  float4 main_PS(float2 Tex: TEXCOORD0) : COLOR  { return tex2D(OrgSampler, Tex); }

  technique one { pass P1 { PixelShader = compile ps_2_0 main_PS(); } }";
}

VIEW* SecondView = { material = mtl_ShowRt; flags = PROCESS_TARGET;}

function main()
{
  video_set(1024,768,0,1); 
  camera.bmap = camera_scene; 
  camera.stage = SecondView;
  level_load("");
  ent_create("blob.mdl",vector(150,0,0),NULL);
}



In the above example, if I use a predefined bitmap for skin1 (such as "logo_800.jpg" from the GS folder), it is rendered to the screen as expected, however if I use the view.bmap, the view.bmap is not rendered to the screen.

This example is the same as above, except the view.bmp is rendered in a panel, correctly. Since the effect only renders the view.bmap to the screen, the screen should be a duplicate of the panels bitmap, but it is not!

Code:
BMAP* camera_scene = "#1024x768x32";

ENTITY* blob = { type = "blob.mdl";  flags2 = SHOW; x = 150; y = 35; }

PANEL * RT_Panel = {pos_x = 0; pos_y = 0; scale_x = 0.25; scale_y = 0.25; flags = SHOW;}

MATERIAL* mtl_ShowRt = 
{	
  skin1 = camera_scene;

  effect = "
  Texture mtlSkin1; 
  sampler OrgSampler = sampler_state { texture = <mtlSkin1>;};

  float4 main_PS(float2 Tex: TEXCOORD0) : COLOR  { return tex2D(OrgSampler, Tex); }

  technique one { pass P1 { PixelShader = compile ps_2_0 main_PS(); } }";
}

VIEW* SecondView = { material = mtl_ShowRt; flags = PROCESS_TARGET;}

function main()
{
  video_set(1024,768,0,1); 
  camera.bmap = camera_scene; 
  RT_Panel.bmap = camera_scene;
  camera.stage = SecondView;
  level_load("");
  ent_create("blob.mdl",vector(150,0,0),NULL);
}



Quote:

It makes only sense to give a view entity a render target when you want to view it in a panel or something like that. Otherwise, just render it straight on the screen.


Simple example; say I have weapon as a view entity, and I have a PP view chain (which passes the original view to the effect chain for blending). I want the PP effects to include the weapon or at least for the weapon to be visible. This does not seem possible.

If I (and the others) can not do this, then beginners will never "get it" either. If it is possible, then please provide an example.

Thanks.


Not two, not one.