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:

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.

drawing-7-1753492131.png

Set the following items in the Add New Render Target dialog box and click [ OK ] to create a new Render Target.

drawing-7-1753839682.png
(1) Top input field The location where the Render Target is saved in Solution Explorer
(2) Name The Render Target Name
(3) Description The Render Target Description
(4) Annotations The Render Target Annotations
(5) URI The Render Target URI
(6) Export Always If enabled, the Render Target selected at the time of asset generation is always exported to the asset.
(7) Render Target Template The Render Target template
(8) Display The display that is linked to the Render Target

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.

The newly added render target can have the properties listed in the table below set in the Properties panel. 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.

Section Property name Description
Render Target
Render Target Template

The Render Target template

Select the Render Target template from the following:

  • Hybrid 2D/3D Window Surface
  • Hybrid 2D/3D Off-Screen Surface
  • Software Layer

For details, please refer to Cameras and Render Targets.

Display

The Display that is linked to the Render Target

This property can only be set when Render Target Template = Hybrid 2D/3D Window Surface.

Owner

Hybrid 2D/3D Off-Screen Surface: Surface owner
Software Layer: Software Layer owner

This property can only be set when the Render Target Template is set to Hybrid 2D/3D Window Surface or Software Layer.

Type The Render Target type
Auto Swap If enabled, the buffer will be automatically swapped (switched to new drawing) once all cameras linked to the Render Target have completed drawing.
Auto Clear

If enabled, the relevant buffers (color, depth, and stencil buffers) are automatically cleared before a rendering operation to a Render Target is performed.

The depth buffer is cleared with "1.0" values.

Is Default

If enabled, it will be set as the default Render Target.

For details, please refer to Default Render Target.

Orientation

Rotation angle of the rendered image (0°/90°/180°/270°)

For details, please refer to Rotate Display Preview.

ClearMode

A ClearMode item used to clear the buffer associated with a 3D Render Target.

For instructions on how to create a ClearMode item, see ClearMode.

ClearMode2D Color to clear the color buffer of a 2D Render Target

The properties in the Edting Utilities section vary depending on the Render Target Template selected.

Render Target Template: Hybrid 2D/3D Window Surface Edting Utilities section properties:

Section Property name Description
Edting Utilities
Preview Border Scope

Preview borders for the targeted Render Target

Available in Global Preferences.

  • None: Border is hidden
  • Global: Border based on global coordinates
  • Local: Border based on local coordinates
Preview Border Color

Preview border color for the target Render Target

Available in Global Preferences.

Width

Render target width (horizontal pixels)

If this value is "-1", it is calculated from the Display value.

Height

Render target height (vertical pixels)

If this value is "-1", it is calculated from the Display value.

X The position of the Render Target along the X axis (horizontal direction) in the display linked to the Render Target
Y The position of the Render Target along the Y axis (vertical direction) in the display linked to the Render Target
Layer

Window Surface Layer ID

When there are multiple render targets, you can set the rendering order.The higher the number, the higher the layer will be.

  • Bottom layer: Layer = 0

  • Middle layer: Layer = 1

  • Top layer: Layer = 2

The number of layers supported varies by device. Also, Window Surfaces with the same layer ID cannot be uploaded at the same time.

For details, please refer to Multiple Render Targets.

BlendMode

Blend mode

  • BlendModeStandard: A common blend mode that represents transparency based on the alpha value of the source pixel.
  • BlendModePreMultiplied: Performs blending as if the source pixel is already multiplied by the alpha value.
  • BlendModeOff: Blending disabled

For details, please refer to Blend Modes.

AntiAliasingSampleBuffers Number of sample buffers to use for anti-aliasing
AntiAliasingMultiSamplingFactor Minimum number of samples to use for multi-sample buffers used for anti-aliasing
MaxSwapInterval

Maximum swap interval

Set when using EGL settings. If this value is "-1", the maximum swap interval is not limited.

MinSwapInterval

Minimum swap interval

Set when using EGL settings. If this value is "-1", the minimum swap interval is not limited.

SwapInterval

Swap Interval

Applies to the Window Surface. The initial value is "1".

If the value is "0", the buffer swap is not synchronized with the video frame, and the swap is performed as soon as rendering is completed.

If the value is "1" or more, the buffer swap is performed every time the vertical synchronization signal (V-sync) is received the number of times specified by the value.

RedSize The number of bits for the Red color in the color buffer.
GreenSize

The number of bits for the Green color in the color buffer.

BlueSize The number of bits for the Blue color in the color buffer.
AlphaSize The number of bits for the Alpha in the color buffer.
Conformant Set this property to enabled if Render Target is OpenGL ES compliant.
DepthSize

Number of bits in the depth buffer

StencilSize Number of bits in the stencil buffer
BufferPreservedBit If enabled, Render Target contents are preserved after buffer swapping, potentially improving performance by reducing GPU strain when only a portion of the screen changes.

Render Target Template:Hybrid 2D/3D Off-Screen Surface Edting Utilities section properties:

Section Property Name Description
Edting Utilities
Preview Border Scope

Preview borders for the targeted Render Target

Available in Global Preferences.

  • None: Border is hidden
  • Global: Border based on global coordinates
  • Local: Border based on local coordinates
Preview Border Color

Preview border color for the target Render Target

Available in Global Preferences.

ColorFormat Color buffer format

DepthFormat

Depth buffer format
StencilFormat Stencil buffer format
ExternalColorTexture Attaches an external color buffer to a Render Target.
ExternalDepthBuffer

Attaches an external depth buffer to a Render Target.

ExternalStencilBuffer Attaches an external stencil buffer to a Render Target.
Width

Render target width (horizontal pixels)

If this value is "-1", it is calculated from the Display value.

Height

Render target height (vertical pixels)

If this value is "-1", it is calculated from the Display value.

MsaaSamples

MSAA (Multisample Anti-Aliasing) Sample Count

For details, please refer to Multisample Anti-Aliasing Offscreen Render Targets.

Render Target Template:Software Layer Edting Utilities section properties:

Section Property Name Description
Edting Utilities
Preview Border Scope

Preview borders for the targeted Render Target

Available in Global Preferences.

  • None: Border is hidden
  • Global: Border based on global coordinates
  • Local: Border based on local coordinates
Preview Border Color

Preview border color for the target Render Target

Available in Global Preferences.

ColorFormat Color buffer format

DepthFormat

Depth buffer format
StencilFormat Stencil buffer format
ExternalColorTexture Attaches an external color buffer to a Render Target.
ExternalDepthBuffer

Attaches an external depth buffer to a Render Target.

ExternalStencilBuffer Attaches an external stencil buffer to a Render Target.
Width

Render target width (horizontal pixels)

Height

Render target height (vertical pixels)

X The position of the Render Target along the X axis (horizontal direction) in the Render Target's owner (drawing area).
Y The position of the Render Target along the Y axis (vertical direction) in the Render Target's owner (drawing area).
Layer

Software Layer ID

When a Software Layer is made up of multiple layers, you can set the rendering order. The higher the number, the higher the layer.

BlendMode

Blend mode

For details, please refer to Blend Modes.

ConstantAlpha Alpha (transparency) applied to the entire Software Layer
BufferCount

Number of buffers used by the Software Layer

  • SoftwareLayerSingleBuffered
  • SoftwareLayerDoubleBuffered
Enabled Enable (show)/disable (hide) Software Layers
CompositionCamera

CompositionCamera

The drawing of each layer in the Software Layer is used by the Composition Camera to generate the final display image. For details please refer to Software Layers.

BorderEnabled

Show/Hide Layer Borders

Each Software Layer is separated by a one-pixel border.

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

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-1753492872.png

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

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-5-1718955412.png

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.

drawing-5-1718955548.png

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.

Clear Mode Property
See also: Candera::ClearMode



Revision #16
Created 2023-02-13 05:38:57 UTC by Kanai Tomoaki
Updated 2025-07-30 01:38:30 UTC by Kanai Tomoaki