/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/RendererCore/Pipeline/Passes/BloomPass.h
42 строки
2 KB
Sanakan8472
Render Graph (#1948)
03 июн 2026, 10:19
Не верифицирован
03 июн 2026, 10:19
60bb12c
Код
Авторство
О чём код?
#pragma once #include <RendererCore/Declarations.h> #include <RendererCore/Pipeline/RenderPipelinePass.h> #include <RendererCore/Shader/ConstantBufferStorage.h> #include <RendererCore/Shader/ShaderResource.h> /// Render pass that applies a bloom effect to bright areas of the image. /// /// Extracts bright pixels above a threshold, blurs them, and outputs them to a separate render target. /// This render target can then be combined with the original image to create a glow effect which is typically done in the tone mapping pass. /// Supports configurable radius, threshold, intensity, and tint colors for inner, mid, and outer bloom regions. class EZ_RENDERERCORE_DLL ezBloomPass : public ezRenderPipelinePass { EZ_ADD_DYNAMIC_REFLECTION(ezBloomPass, ezRenderPipelinePass); public: ezBloomPass(); ~ezBloomPass(); virtual ezStatus AddRenderPasses(const ezViewData& viewData, const ezCamera& camera, ezRenderGraph& ref_graph, const ezArrayPtr<const ezRenderPipelinePinConnection> inputs, ezArrayPtr<ezRenderPipelinePinConnection> outputs) override; virtual ezStatus AddRenderPassesInactive(const ezViewData& viewData, const ezCamera& camera, ezRenderGraph& ref_graph, const ezArrayPtr<const ezRenderPipelinePinConnection> inputs, ezArrayPtr<ezRenderPipelinePinConnection> outputs) override; virtual ezResult Serialize(ezStreamWriter& inout_stream) const override; virtual ezResult Deserialize(ezStreamReader& inout_stream) override; protected: void UpdateConstantBuffer(ezVec2 pixelSize, const ezColor& tintColor); ezRenderPipelineNodeInputPin m_PinInput; ezRenderPipelineNodeOutputPin m_PinOutput; float m_fRadius = 0.2f; float m_fThreshold = 1.0f; float m_fIntensity = 0.3f; ezEnum<ezGALResourceFormat> m_TextureFormat; ezColorGammaUB m_InnerTintColor = ezColor::White; ezColorGammaUB m_MidTintColor = ezColor::White; ezColorGammaUB m_OuterTintColor = ezColor::White; ezConstantBufferStorageHandle m_hConstantBuffer; ezShaderResourceHandle m_hShader; };