target1
target2
target3
Render targets for the COLOR1...COLOR3 pixel shader output semantics. Can be used to store depths or other parameters f.i. for deferred shading.
Type:
BMAP*
Remarks:
-
All render targets of a view must have the same size and format. If view.bmap is not set, the target1..target3 bitmaps must have the same size as the screen.
-
The sky_color affects all render targets. Set it to (0,0,0) if you want to prevent that the render targets are cleared at the begin of every view rendering.
- Not all 3D cards support multiple render targets.
If they do, then normally four targets are supported.
- See also the remarks under view.bmap.
Example (lite-C):
function main()
{
level_load("...");
camera.bmap = bmap_createblack(512,512,24);
camera.target1 = bmap_createblack(512,512,24);
camera.target2 = bmap_createblack(512,512,24);
// display the render target content for debugging purposes
while(1) {
DEBUG_BMAP(camera.bmap,0,0.5);
DEBUG_BMAP(camera.target1,300,0.5);
DEBUG_BMAP(camera.target2,600,0.5);
wait(1);
}
}
See also:
view.bmap, bmap_zbuffer, material events,
render_view
► latest
version online