Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
Public Member Functions | List of all members
foray::stages::ExternalDenoiserStage Class Reference

Base class for externally computing denoiser implementations (e.g. OptiX Denoiser) More...

#include <foray_denoiserstage.hpp>

Inheritance diagram for foray::stages::ExternalDenoiserStage:
foray::stages::DenoiserStage foray::stages::RenderStage

Public Member Functions

virtual void BeforeDenoise (VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
 Vulkan side work to be computed before doing external work.
 
virtual void AfterDenoise (VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
 Vulkan side work to be computed after doing external work.
 
virtual void DispatchDenoise (uint64_t timelineSemaphoreValueBefore, uint64_t timelineSemaphoreValueAfter)
 Function for dispatching Api-external work.
 
- Public Member Functions inherited from foray::stages::DenoiserStage
virtual void Init (core::Context *context, const DenoiserConfig &config)
 
virtual void UpdateConfig (const DenoiserConfig &config)
 
virtual std::string GetUILabel ()
 Get the UI label used for user facing labelling of the denoiser.
 
virtual void DisplayImguiConfiguration ()
 Record the ImGui commands for configuration of the denoiser.
 
virtual void IgnoreHistoryNextFrame ()
 Signals the denoiser stage that history information is to be ignored for the coming frame.
 
- Public Member Functions inherited from foray::stages::RenderStage
 RenderStage ()=default
 
virtual void RecordFrame (VkCommandBuffer cmdBuffer, base::FrameRenderInfo &renderInfo)
 Records a frame to cmdBuffer.
 
virtual void Destroy ()
 Destroy the render stage. Finalizes all components.
 
virtual void Resize (const VkExtent2D &extent)
 Default implementation accesses mImageOutputs and calls ManagedImage::Resize(extent) on any set image.
 
std::vector< core::ManagedImage * > GetImageOutputs ()
 Gets a vector to all color attachments that will be included in a texture array and can be referenced in the shader pass.
 
core::ManagedImageGetImageOutput (std::string_view name, bool noThrow=false)
 Gets an image output.
 
virtual void OnShadersRecompiled (const std::unordered_set< uint64_t > &recompiled)
 Notifies the stage that the shader compiler instance has recompiled a shader.
 
virtual ~RenderStage ()
 

Additional Inherited Members

- Protected Member Functions inherited from foray::stages::RenderStage
virtual void ReloadShaders ()
 Override this to reload all shaders and rebuild pipelines after a registered shader has been recompiled.
 
virtual void DestroyOutputImages ()
 Calls Destroy() on any image in mImageOutputs and clears mImageOutputs.
 
- Protected Attributes inherited from foray::stages::RenderStage
std::unordered_map< std::string, core::ManagedImage * > mImageOutputs
 Inheriting types should emplace their images onto this collection to provide them in GetImageOutput interface.
 
std::vector< uint64_t > mShaderKeys
 Inheriting types should emplace their shader keys onto this collection such that if a shader has been recompiled, ReloadShaders() will be called.
 
core::ContextmContext = nullptr
 Context object the renderstage is built upon.
 

Detailed Description

Base class for externally computing denoiser implementations (e.g. OptiX Denoiser)

Remarks
The Semaphore member of DenoiserConfig is expected to be used for synchronization

Member Function Documentation

◆ AfterDenoise()

virtual void foray::stages::ExternalDenoiserStage::AfterDenoise ( VkCommandBuffer  cmdBuffer,
base::FrameRenderInfo renderInfo 
)
inlinevirtual

Vulkan side work to be computed after doing external work.

◆ BeforeDenoise()

virtual void foray::stages::ExternalDenoiserStage::BeforeDenoise ( VkCommandBuffer  cmdBuffer,
base::FrameRenderInfo renderInfo 
)
inlinevirtual

Vulkan side work to be computed before doing external work.

◆ DispatchDenoise()

virtual void foray::stages::ExternalDenoiserStage::DispatchDenoise ( uint64_t  timelineSemaphoreValueBefore,
uint64_t  timelineSemaphoreValueAfter 
)
inlinevirtual

Function for dispatching Api-external work.

Parameters
timelineSemaphoreValueBeforeTimeline Semaphore Value the external api should work on before running
timelineSemaphoreValueAfterTimeline Semaphore Value the external api should signal after completing

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