MCPcopy Create free account
hub / github.com/DiligentGraphics/DiligentFX / Bloom

Class Bloom

PostProcess/Bloom/interface/Bloom.hpp:50–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50class Bloom
51{
52public:
53 enum FEATURE_FLAGS : Uint32
54 {
55 FEATURE_FLAG_NONE = 0u
56 };
57
58 struct RenderAttributes
59 {
60 /// Render device that may be used to create new objects needed for this frame, if any.
61 IRenderDevice* pDevice = nullptr;
62
63 /// Optional render state cache to optimize state loading.
64 IRenderStateCache* pStateCache = nullptr;
65
66 /// Device context that will record the rendering commands.
67 IDeviceContext* pDeviceContext = nullptr;
68
69 /// PostFX context
70 PostFXContext* pPostFXContext = nullptr;
71
72 /// Shader resource view of the source color.
73 ITextureView* pColorBufferSRV = nullptr;
74
75 /// Bloom settings
76 const HLSL::BloomAttribs* pBloomAttribs = nullptr;
77 };
78
79 struct CreateInfo
80 {
81 bool EnableAsyncCreation = false;
82 };
83
84public:
85 Bloom(IRenderDevice* pDevice, const CreateInfo& CI);
86
87 ~Bloom();
88
89 void PrepareResources(IRenderDevice* pDevice, IDeviceContext* pDeviceContext, PostFXContext* pPostFXContext, FEATURE_FLAGS FeatureFlags);
90
91 void Execute(const RenderAttributes& RenderAttribs);
92
93 static bool UpdateUI(HLSL::BloomAttribs& Attribs, FEATURE_FLAGS& FeatureFlags);
94
95 ITextureView* GetBloomTextureSRV() const;
96
97private:
98 using RenderTechnique = PostFXRenderTechnique;
99 using ResourceInternal = RefCntAutoPtr<IDeviceObject>;
100
101 enum RENDER_TECH : Uint32
102 {
103 RENDER_TECH_COMPUTE_PREFILTERED_TEXTURE = 0,
104 RENDER_TECH_COMPUTE_DOWNSAMPLED_TEXTURE,
105 RENDER_TECH_COMPUTE_UPSAMPLED_TEXTURE,
106 RENDER_TECH_COUNT
107 };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected