Converts the HDR geometry output to a displayable LDR image. More...
#include <ToneMapPass.h>
Public Member Functions | |
| FRAMEWORK_API void | Init (u32 width, u32 height, bool swapchainTarget, Ref< Image2D > hdrInput) |
| Allocates the LDR output image (or targets the swapchain), pipeline, and quad geometry. | |
| FRAMEWORK_API void | Shutdown () |
| Releases all GPU resources owned by this pass. | |
| FRAMEWORK_API void | Execute () |
| Uploads the current ToneMapData settings and renders the fullscreen quad. | |
| Ref< Image2D > | GetOutput (u32 index=0) |
| Returns the LDR output image (invalid when targeting the swapchain directly). | |
| ToneMapData & | GetSettings () |
| Returns a mutable reference to the tone mapping configuration. | |
| template<typename... Args> | |
| void | UpdateInput (Args &&... args) |
| Rebinds a named input and rebakes the descriptor set. | |
Converts the HDR geometry output to a displayable LDR image.
Renders a fullscreen quad that samples the HDR input image, applies the configured tone mapping operator and optional gamma correction, and writes the result to either an intermediate LDR image (editor) or directly to the swapchain (standalone runtime).
This is the last pass in the frame; its output is accessed via GetOutput.
| void Raven::ToneMapPass::Execute | ( | ) |
Uploads the current ToneMapData settings and renders the fullscreen quad.
Returns the LDR output image (invalid when targeting the swapchain directly).
| index | Output attachment index |
Ref if rendering to the swapchain.
|
inline |
Returns a mutable reference to the tone mapping configuration.
| void Raven::ToneMapPass::Init | ( | u32 | width, |
| u32 | height, | ||
| bool | swapchainTarget, | ||
| Ref< Image2D > | hdrInput ) |
Allocates the LDR output image (or targets the swapchain), pipeline, and quad geometry.
| width | Render target width in pixels. |
| height | Render target height in pixels. |
| swapchainTarget | true to render directly to the swapchain (standalone runtime). |
| hdrInput | HDR RGBA16F image produced by GeometryPass. |
| void Raven::ToneMapPass::Shutdown | ( | ) |
Releases all GPU resources owned by this pass.
|
inline |
Rebinds a named input and rebakes the descriptor set.
| Args | Forwarded to RenderPass::SetInput. |