# Rendering

Interface · category: Other

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/extras/render-passes/camera-frame.js#L18

Properties related to scene rendering, encompassing settings that control the rendering resolution,
pixel format, multi-sampling for anti-aliasing, tone-mapping and similar.

## Properties

### renderFormats

```ts
renderFormats: number[]
```

The preferred render formats of the frame buffer, in order of
preference. First format from this list that is supported by the hardware is used. When none of
the formats are supported, [PIXELFORMAT_RGBA8](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA8.md) is used, but this automatically disables
bloom effect, which requires HDR format. The list can contain the following formats:
[PIXELFORMAT_111110F](https://api.playcanvas.com/engine/variables/PIXELFORMAT_111110F.md), [PIXELFORMAT_RGBA16F](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA16F.md), [PIXELFORMAT_RGBA32F](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA32F.md) and [PIXELFORMAT_RGBA8](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA8.md). Typically the default option should be used, which prefers the faster formats,
but if higher dynamic range is needed, the list can be adjusted to prefer higher precision formats.
Defaults to [[PIXELFORMAT_111110F](https://api.playcanvas.com/engine/variables/PIXELFORMAT_111110F.md), [PIXELFORMAT_RGBA16F](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA16F.md), [PIXELFORMAT_RGBA32F](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA32F.md)].

### renderTargetScale

```ts
renderTargetScale: number
```

The scale of the render target, 0.1-1 range. This allows the
scene to be rendered to a lower resolution render target as an optimization. The post-processing
is also applied at this lower resolution. The image is then up-scaled to the full resolution and
any UI rendering that follows is applied at the full resolution. Defaults to 1 which represents
full resolution rendering.

### samples

```ts
samples: number
```

The number of samples of the [RenderTarget](https://api.playcanvas.com/engine/classes/RenderTarget.md) used for the scene
rendering, in 1-4 range. Value of 1 disables multisample anti-aliasing, other values enable
anti-aliasing, Typically set to 1 when TAA is used, even though both anti-aliasing options can be
used together at a higher cost. Defaults to 1.

### sceneColorMap

```ts
sceneColorMap: boolean
```

Whether rendering generates a scene color map. Defaults to false.

### sceneDepthMap

```ts
sceneDepthMap: boolean
```

Whether rendering generates a scene depth map. Defaults to false.

### sharpness

```ts
sharpness: number
```

The sharpening intensity, 0-1 range. This can be used to increase
the sharpness of the rendered image. Often used to counteract the blurriness of the TAA effect,
but also blurriness caused by rendering to a lower resolution render target by using
rendering.renderTargetScale property. Defaults to 0.

### stencil

```ts
stencil: boolean
```

Whether the render buffer has a stencil buffer. Defaults to false.

### toneMapping

```ts
toneMapping: number
```

The tone mapping. Can be:

- [TONEMAP_LINEAR](https://api.playcanvas.com/engine/variables/TONEMAP_LINEAR.md)
- [TONEMAP_FILMIC](https://api.playcanvas.com/engine/variables/TONEMAP_FILMIC.md)
- [TONEMAP_HEJL](https://api.playcanvas.com/engine/variables/TONEMAP_HEJL.md)
- [TONEMAP_ACES](https://api.playcanvas.com/engine/variables/TONEMAP_ACES.md)
- [TONEMAP_ACES2](https://api.playcanvas.com/engine/variables/TONEMAP_ACES2.md)
- [TONEMAP_NEUTRAL](https://api.playcanvas.com/engine/variables/TONEMAP_NEUTRAL.md)

Defaults to [TONEMAP_LINEAR](https://api.playcanvas.com/engine/variables/TONEMAP_LINEAR.md).
