Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
foray_denoiserstage.hpp
Go to the documentation of this file.
1#pragma once
2#include "../bench/foray_bench_declares.hpp"
3#include "../util/foray_externalsemaphore.hpp"
4#include "foray_gbuffer.hpp"
6
7namespace foray::stages {
8
38
41 {
42 public:
43 virtual void Init(core::Context* context, const DenoiserConfig& config){};
44 virtual void UpdateConfig(const DenoiserConfig& config){};
46 virtual std::string GetUILabel() { return "Unnamed Denoiser"; }
48 virtual void DisplayImguiConfiguration(){};
50 virtual void IgnoreHistoryNextFrame(){};
51 };
52
56 {
57 public:
59 virtual void BeforeDenoise(VkCommandBuffer cmdBuffer, base::FrameRenderInfo& renderInfo){};
61 virtual void AfterDenoise(VkCommandBuffer cmdBuffer, base::FrameRenderInfo& renderInfo){};
65 virtual void DispatchDenoise(uint64_t timelineSemaphoreValueBefore, uint64_t timelineSemaphoreValueAfter){};
66 };
67} // namespace foray::stages
Context used for render processes. This object is rebuilt for every frame. /.
Definition foray_framerenderinfo.hpp:14
A device benchmark based on Vulkans DeviceQuery Api. Timestamps are recorded in milliseconds....
Definition foray_devicebenchmark.hpp:13
Wraps allocation and lifetime functionality of VkImage.
Definition foray_managedimage.hpp:13
Base class for denoiser implementations.
Definition foray_denoiserstage.hpp:41
virtual void Init(core::Context *context, const DenoiserConfig &config)
Definition foray_denoiserstage.hpp:43
virtual std::string GetUILabel()
Get the UI label used for user facing labelling of the denoiser.
Definition foray_denoiserstage.hpp:46
virtual void UpdateConfig(const DenoiserConfig &config)
Definition foray_denoiserstage.hpp:44
virtual void IgnoreHistoryNextFrame()
Signals the denoiser stage that history information is to be ignored for the coming frame.
Definition foray_denoiserstage.hpp:50
virtual void DisplayImguiConfiguration()
Record the ImGui commands for configuration of the denoiser.
Definition foray_denoiserstage.hpp:48
Base class for externally computing denoiser implementations (e.g. OptiX Denoiser)
Definition foray_denoiserstage.hpp:56
virtual void AfterDenoise(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
Vulkan side work to be computed after doing external work.
Definition foray_denoiserstage.hpp:61
virtual void DispatchDenoise(uint64_t timelineSemaphoreValueBefore, uint64_t timelineSemaphoreValueAfter)
Function for dispatching Api-external work.
Definition foray_denoiserstage.hpp:65
virtual void BeforeDenoise(VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
Vulkan side work to be computed before doing external work.
Definition foray_denoiserstage.hpp:59
Utilizes rasterization to render a GBuffer output.
Definition foray_gbuffer.hpp:22
static constexpr std::string_view NormalOutputName
Definition foray_gbuffer.hpp:52
static constexpr std::string_view LinearZOutputName
Definition foray_gbuffer.hpp:57
static constexpr std::string_view MaterialIdxOutputName
Definition foray_gbuffer.hpp:55
static constexpr std::string_view PositionOutputName
Definition foray_gbuffer.hpp:51
static constexpr std::string_view AlbedoOutputName
Definition foray_gbuffer.hpp:53
static constexpr std::string_view MotionOutputName
Definition foray_gbuffer.hpp:54
static constexpr std::string_view DepthOutputName
Definition foray_gbuffer.hpp:58
static constexpr std::string_view MeshInstanceIdOutputName
Definition foray_gbuffer.hpp:56
Render stage base class giving a common interface for rendering processes.
Definition foray_renderstage.hpp:15
core::ManagedImage * GetImageOutput(std::string_view name, bool noThrow=false)
Gets an image output.
Timeline Semaphore exposing handles for synchronization with other Apis (e.g. Cuda for OptiX denoisin...
Definition foray_externalsemaphore.hpp:8
Definition foray_blitstage.hpp:4
Non owning context object.
Definition foray_context.hpp:16
Config struct for initialization of denoiser stages.
Definition foray_denoiserstage.hpp:11
util::ExternalSemaphore * Semaphore
Semaphore for synchronisation of externally computing denoisers (e.g. OptiX Denoiser)
Definition foray_denoiserstage.hpp:23
DenoiserConfig(core::ManagedImage *primaryIn, core::ManagedImage *primaryOut, GBufferStage *gbuffer)
Definition foray_denoiserstage.hpp:27
core::ManagedImage * PrimaryOutput
The primary output. Denoised Image from the denoiser.
Definition foray_denoiserstage.hpp:19
bench::DeviceBenchmark * Benchmark
Definition foray_denoiserstage.hpp:24
DenoiserConfig()
Definition foray_denoiserstage.hpp:26
std::unordered_map< std::string, core::ManagedImage * > AuxiliaryInputs
Misc. input Images (e.g. Mesh Id, Material Id, History data)
Definition foray_denoiserstage.hpp:17
core::ManagedImage * PrimaryInput
The primary input. Noisy linear radiance data, usually from the raytracer directly.
Definition foray_denoiserstage.hpp:13
std::array< core::ManagedImage *,(size_t) GBufferStage::EOutput::MaxEnum > GBufferOutputs
GBuffer Output images.
Definition foray_denoiserstage.hpp:15
void * AuxiliaryData
Customizable pointer to auxiliary data.
Definition foray_denoiserstage.hpp:21