ScenePostProcessSettings
The module provides image post-processing methods (for example, tone mapping) in 3D graphics.
NOTE
- The initial APIs of this module are supported since API version 12. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Modules to Import
import { ToneMappingType, ToneMappingSettings, BloomSettings, PostProcessSettings } from '@kit.ArkGraphics3D';
ToneMappingType
Enumerates the tone mapping types.
System capability: SystemCapability.ArkUi.Graphics3D
| Name | Value | Description |
|---|---|---|
| ACES | 0 | Academy Color Encoding System (ACES). |
| ACES_2020 | 1 | ACES_2020. |
| FILMIC | 2 | Filmic. |
ToneMappingSettings
Describes the tone mapping settings.
System capability: SystemCapability.ArkUi.Graphics3D
| Name | Type | Read Only | Optional | Description |
|---|---|---|---|---|
| type | ToneMappingType | No | Yes | Tone mapping type. The default value is undefined. |
| exposure | number | No | Yes | Exposure. The value must be greater than 0. The default value is undefined. |
BloomSettings18+
Describes the settings for bloom effects. It is unavailable when RenderingPipelineType is set to FORWARD_LIGHTWEIGHT.
System capability: SystemCapability.ArkUi.Graphics3D
| Name | Type | Read Only | Optional | Description |
|---|---|---|---|---|
| thresholdHard | number | No | Yes | Hard threshold. The value is a non-negative number. The default value is 1.0. |
| thresholdSoft | number | No | Yes | Soft threshold. The value is a non-negative number. The default value is 2.0. |
| scaleFactor | number | No | Yes | Scale factor. The value must be greater than 0. The default value is 1.0. |
| scatter | number | No | Yes | Scatter amount. The value must be greater than 0. The default value is 1.0. |
VignetteSettings22+
Describes the settings for vignette effects.
System capability: SystemCapability.ArkUi.Graphics3D
| Name | Type | Read Only | Optional | Description |
|---|---|---|---|---|
| roundness | number | No | Yes | Application scope. The value range is [0, 1]. When the value is 0, the application scope is minimized. When the value is 1, the application scope is global. The default value is sqrt(0.5). |
| intensity | number | No | Yes | Effect strength. The value range is [0, 1]. The value 0 indicates no vignetting effect, and the value 1 indicates maximum vignetting intensity. The default value is 0.4. |
ColorFringeSettings22+
Describes the settings for color fringing. It is unavailable when RenderingPipelineType is set to FORWARD_LIGHTWEIGHT.
System capability: SystemCapability.ArkUi.Graphics3D
| Name | Type | Read Only | Optional | Description |
|---|---|---|---|---|
| intensity | number | No | Yes | Strength of the effect. The value ranges from 0 to 1. The default value is 0.2. |
PostProcessSettings
Post-processing settings, which are used to configure the image processing effect after camera rendering, including tone mapping, bloom, vignetting, and chromatic aberration. This is used as the postProcess attribute of Camera.
System capability: SystemCapability.ArkUi.Graphics3D
| Name | Type | Read Only | Optional | Description |
|---|---|---|---|---|
| toneMapping | ToneMappingSettings | No | Yes | Tone mapping settings. The default value is undefined. |
| bloom18+ | BloomSettings | No | Yes | Bloom settings. The default value is undefined. |
| vignette22+ | VignetteSettings | No | Yes | Vignette settings. The default value is undefined. |
| colorFringe22+ | ColorFringeSettings | No | Yes | Color fringing settings. The default value is undefined. |