Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::ToneMapPass Class Reference

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< Image2DGetOutput (u32 index=0)
 Returns the LDR output image (invalid when targeting the swapchain directly).
ToneMapDataGetSettings ()
 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.

Detailed Description

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.

Member Function Documentation

◆ Execute()

void Raven::ToneMapPass::Execute ( )

Uploads the current ToneMapData settings and renders the fullscreen quad.

◆ GetOutput()

Ref< Image2D > Raven::ToneMapPass::GetOutput ( u32 index = 0)
inline

Returns the LDR output image (invalid when targeting the swapchain directly).

Parameters
indexOutput attachment index
Returns
LDR output image, or an empty Ref if rendering to the swapchain.

◆ GetSettings()

ToneMapData & Raven::ToneMapPass::GetSettings ( )
inline

Returns a mutable reference to the tone mapping configuration.

◆ Init()

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.

Parameters
widthRender target width in pixels.
heightRender target height in pixels.
swapchainTargettrue to render directly to the swapchain (standalone runtime).
hdrInputHDR RGBA16F image produced by GeometryPass.

◆ Shutdown()

void Raven::ToneMapPass::Shutdown ( )

Releases all GPU resources owned by this pass.

◆ UpdateInput()

template<typename... Args>
void Raven::ToneMapPass::UpdateInput ( Args &&... args)
inline

Rebinds a named input and rebakes the descriptor set.

Template Parameters
ArgsForwarded to RenderPass::SetInput.

The documentation for this class was generated from the following files: