1 /* 2 * Copyright (c) 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 #ifndef SCENE_INTERFACE_POSTPROCESS_IBLOOM_H 17 #define SCENE_INTERFACE_POSTPROCESS_IBLOOM_H 18 19 #include <scene/base/types.h> 20 #include <scene/interface/intf_image.h> 21 #include <scene/interface/postprocess/intf_postprocess_effect.h> 22 23 SCENE_BEGIN_NAMESPACE() 24 25 /** Bloom type enum */ 26 enum class BloomType { 27 /** Normal, smooth to every direction */ 28 NORMAL = 0, 29 /** Blurred/Blooms more in horizontal direction */ 30 HORIZONTAL = 1, 31 /** Blurred/Blooms more in vertical direction */ 32 VERTICAL = 2, 33 /** Bilateral filter, uses depth if available */ 34 BILATERAL = 3, 35 }; 36 37 class IBloom : public IPostProcessEffect { 38 META_INTERFACE(IPostProcessEffect, IBloom, "8020311e-8724-4a20-be99-e46cf667b505") 39 public: 40 /** 41 * @brief Camera post-processing settings, bloom type 42 */ 43 META_PROPERTY(BloomType, Type) 44 /** 45 * @brief Camera post-processing settings, bloom quality type 46 */ 47 META_PROPERTY(EffectQualityType, Quality) 48 /** 49 * @brief Camera post-processing settings, bloom threshold hard 50 */ 51 META_PROPERTY(float, ThresholdHard) 52 /** 53 * @brief Camera post-processing settings, bloom threshold soft 54 */ 55 META_PROPERTY(float, ThresholdSoft) 56 /** 57 * @brief Camera post-processing settings, bloom amount coefficient 58 */ 59 META_PROPERTY(float, AmountCoefficient) 60 /** 61 * @brief Camera post-processing settings 62 */ 63 META_PROPERTY(float, DirtMaskCoefficient) 64 /** 65 * @brief Camera post-processing settings 66 */ 67 META_PROPERTY(IImage::Ptr, DirtMaskImage) 68 /** 69 * @brief Camera post-processing settings 70 */ 71 META_PROPERTY(bool, UseCompute) 72 /** 73 * @brief Scatter (amount of bloom spread). (1.0 full spread / default) 74 */ 75 META_PROPERTY(float, Scatter) 76 /** @brief Scaling factor. Controls the amount of scaling and bloom spread 77 * Reduces the downscale and upscale steps 78 * Values 0 - 1. Value of 0.5 halves the scale steps 79 */ 80 META_PROPERTY(float, ScaleFactor) 81 }; 82 83 SCENE_END_NAMESPACE() 84 85 META_TYPE(SCENE_NS::BloomType) 86 META_INTERFACE_TYPE(SCENE_NS::IBloom) 87 88 #endif 89