Skip to main content

Add a new Render Target

Add Render Target

A render target is an abstraction of a rendering surface. In the field of 3D computer graphics, it is a feature of modern graphics processing units (GPUs) that allows a 3D scene to be rendered to an intermediate memory buffer, or Render Target Texture (RTT). It can then be manipulated by shaders in order to apply additional effects to the final image before displaying it.

As mentioned before, there are two types of render targets:

  • Display Render Targets: They address the rendering in a native surface of the graphic device.
  • Texture Render Targets: They represent textures which can be used in the scene to render into them. 

A new render target can be added using one of the following possibilities:

Go to "Platform" > "New Render Target" in the menu bar or go to the Render Targets panel, right click on a node under the display and select "New Render Target" from the context menu. Every new created render target could be enabled or disabled by ticking the checkbox. When deactivating/activating a render target by unchecking/checking the checkbox, the render target gets also unloaded/uploaded. Therefore, one can make use of several WindowSurfaceRenderTarget objects having the same layer by activating only one of them; the others will not be uploaded.

drawing-7-1699405983.png

"New Render Target" Menu

drawing-7-1699406090.png

"Render Targets" panel

drawing-7-1699406296.png

New created Render Targets

Specify following settings in the dialog "Add New RenderTarget":

  • Location in the Solution Explorer
  • Render target name
  • Definition: The types available depend on the SceneComposer platform of a given solution, respectively of the feature set of the Candera Device specified by the platform. 
drawing-7-1699406179.png

"Add New Render Target" Dialog

Please refer to the Candera API Documentation to learn about device-specific render target properties: 
Candera::RenderTarget

The properties of the display render targets "Width", "Height" and "X", "Y" coordinates have to be configured with appropriate values that can be changed via Properties panel. The displays and the display render targets associated can be seen in the Render targets panel.

drawing-7-1676268034.pngdrawing-5-1705070672.png

Properties Panel of Render Target

Note:
A render target can be deleted using the context menu option "Delete" in the Render Targets panel.


Configure Render Target

Configure a Display Render Target

In the "Render Targets" panel, the Display Render Targets are organized in the DisplayRenderTargets collection of a Display node. 
New display render targets will be listed under this category.

Configure a Texture Render Target

Rendering to a texture is simple on one hand, but on the other hand it is powerful and enables numerous special effects. It is an extension to rendering to a surface. 
Usually, for a texture render target, the texture render target properties "Width" and "Height" must be configured according to the required size of the texture.

To use a texture render target as a texture, SceneComposer allows selecting a texture render target in the "Choose Item" dialogs, whenever a texture shall be selected during composing a scene.

drawing-7-1676268209.png

Scene with Texture Render Target


Clear Mode Item

The "Clear Mode" item can be created via "Solution Explorer" panel by using the context menu option ("Add" > "New Item"). In this way, all its specific properties ("Clear Color", "Enable Color Write", "Enable Depth Clear" and "Enable Stencil Clear") are related with just one item instead of being included among many other properties of every render target. If there are many render targets which are referencing the same clear mode item, it is enough to modify just one time the desired property rather than modifying every of them.

drawing-7-1699406448.png

Clear Mode item in the "Add New Item" panel  

After the creation of a "Clear Mode" item, it can be used after being referenced from a specific Render Target. This operation can be done by using the "Clear Mode" property available in the "Properties" panel associated with any available render target.

Note:
If a ClearMode is a associated to a RenderTarget, the RenderTarget is cleared using that clearmode before any of the attached cameras renders to it.

drawing-7-1699406649.png

Clear Mode Property

See also: