stage

Links the view to a following view stage that postprocesses the view for adding further effects. This way a view rendering chain can be defined for complex effects, such as shadow mapping.

Type:

VIEW*

Remarks:

Edition:

 C   LC 

Example (lite-C):

MATERIAL* mtlEmboss = // a postprocessing material
{
  effect = "
  Texture TargetMap;
  sampler2D smpSource = sampler_state { texture = <TargetMap>; };
  float4 vecViewPort; // contains viewport pixel size in zw components

  float4 embossPS( float2 Tex : TEXCOORD0 ) : COLOR0 
  {
    float4 Color = float4( 1.0, 0.5, 0.5, 0.5 );
Color -= tex2D( smpSource, Tex.xy-vecViewPort.zw)*2.0;
Color += tex2D( smpSource, Tex.xy+vecViewPort.zw)*2.0;
Color.rgb = (Color.r+Color.g+Color.b)*0.333;
return Color; } technique emboss { pass one { PixelShader = compile ps_2_0 embossPS(); } } technique fallback { pass one { } } "; } VIEW* viewEmboss = { material = mtlEmboss; flags = CHILD | PROCESS_TARGET; } // a postprocessing view ... camera.stage = viewEmboss; // enable postprocessing for the camera view

See also:

VIEW, view.material, view.bmap, PROCESS_SCREEN / PROCESS_TARGET, render_target, render_stencil

► latest version online