bmap_rendertarget(BMAP*,var num,var face)
Specifies a bitmap as a render target for all subsequent objects and views. This way multiple render targets can be set and simultaneously rendered into through the COLOR1...COLORn pixel shader output semantics.
Parameters:
BMAP* - Bitmap pointer to be used as a render target, or NULL for disabling the render target. All render targets must have the same size.
num - Render target number. 0 is the standard COLOR0 target that is also used by
view.bmap, 1 is accessed through COLOR1 and so on.
face - Face number for an environment map render target, 1=west, 2=north, 3=east, 4=south, 5=down, 6=up.
Returns:
0 if the given render target number is not supported by the hardware, otherwise nonzero.
Speed:
Medium
Edition:
A7.08 C
P
Remarks:
- The function can be called in a material event for switching render targets depending on a certain view or a certain object.
- Render target 0 can only be set when the view has no own render target (view.bmap), and can be switched off through bmap_rendertarget(NULL,0,0) for resuming normal screen rendering.
- Not all 3D cards support multiple render targets.
Example:
bmap_rendertarget(bmap_createblack(screen_size.x,screen_size.y,32),1,0);
See also:
view.bmap, bmap_zbuffer, material events
► latest
version online