1/* 2 * Copyright (c) 2024-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file Defines 3D post process related interfaces 18 * @kit ArkGraphics3D 19 */ 20 21/** 22 * The enum of tone mapping type. 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUi.Graphics3D 26 * @since 12 27 */ 28export enum ToneMappingType { 29 /** 30 * The tone mapping type is ACES. 31 * 32 * @syscap SystemCapability.ArkUi.Graphics3D 33 * @since 12 34 */ 35 ACES = 0, 36 37 /** 38 * The tone mapping type is ACES_2020. 39 * 40 * @syscap SystemCapability.ArkUi.Graphics3D 41 * @since 12 42 */ 43 ACES_2020 = 1, 44 45 /** 46 * The tone mapping type is FILMIC. 47 * 48 * @syscap SystemCapability.ArkUi.Graphics3D 49 * @since 12 50 */ 51 FILMIC = 2, 52} 53 54/** 55 * Defines tone mapping parameters. 56 * 57 * @typedef ToneMappingSettings 58 * @syscap SystemCapability.ArkUi.Graphics3D 59 * @since 12 60 */ 61export interface ToneMappingSettings { 62 /** 63 * Type of the tone mapping. 64 * 65 * @type { ?ToneMappingType } 66 * @syscap SystemCapability.ArkUi.Graphics3D 67 * @since 12 68 */ 69 type?: ToneMappingType; 70 71 /** 72 * Exposure of the tone mapping. 73 * 74 * @type { ?number } 75 * @syscap SystemCapability.ArkUi.Graphics3D 76 * @since 12 77 */ 78 exposure?: number; 79} 80 81/** 82 * Defines bloom parameters. 83 * 84 * @typedef BloomSettings 85 * @syscap SystemCapability.ArkUi.Graphics3D 86 * @since 18 87 */ 88export interface BloomSettings { 89 /** 90 * Bloom threshold hard. 91 * 92 * @type { ?number } 93 * @syscap SystemCapability.ArkUi.Graphics3D 94 * @since 18 95 */ 96 thresholdHard?: number; 97 98 /** 99 * Bloom threshold soft. 100 * 101 * @type { ?number } 102 * @syscap SystemCapability.ArkUi.Graphics3D 103 * @since 18 104 */ 105 thresholdSoft?: number; 106 107 /** 108 * Scaling factor. Controls the amount of scaling and bloom spread. 109 * Reduces the downscale and upscale steps. 110 * Values 0 - 1. Value of 0.5 halves the scale steps. 111 * 112 * @type { ?number} 113 * @syscap SystemCapability.ArkUi.Graphics3D 114 * @since 18 115 */ 116 scaleFactor?: number; 117 118 /** 119 * Scatter (amount of bloom spread). (1.0 full spread / default). 120 * 121 * @type { ?number } 122 * @syscap SystemCapability.ArkUi.Graphics3D 123 * @since 18 124 */ 125 scatter?: number; 126} 127 128/** 129 * Defines post processing settings. 130 * 131 * @typedef PostProcessSettings 132 * @syscap SystemCapability.ArkUi.Graphics3D 133 * @since 12 134 */ 135export interface PostProcessSettings { 136 /** 137 * Tone mapping settings of the post processing settings. 138 * 139 * @type { ?ToneMappingSettings } 140 * @syscap SystemCapability.ArkUi.Graphics3D 141 * @since 12 142 */ 143 toneMapping?: ToneMappingSettings; 144 145 /** 146 * Bloom settings of the post processing settings 147 * 148 * @type { ?BloomSettings } 149 * @syscap SystemCapability.ArkUi.Graphics3D 150 * @since 18 151 */ 152 bloom?: BloomSettings; 153} 154