Foundation
Loading...
Searching...
No Matches
Classes | Functions
Foundation::RenderUtils Namespace Reference

Classes

struct  CSClearBufferData
 
struct  CSDebugTextData
 

Functions

PassHandle createCSClearBackBuffer (Renderer *r, StringView name, float4 clearColor={})
 
PassHandle createCSClearTexture (Renderer *r, StringView name, ResourceHandle resource, RHITextureViewDesc viewDesc, float4 clearColor)
 
PassHandle createCSDebugTextPassBackBuffer (Renderer *r, StringView name, Span< const CSDebugTextData > lines)
 
void createCSMipGenerationPasses (Renderer *renderer, StringView name, RHIDeviceQueueType queue, ResourceHandle src, ResourceHandle dst, RHIExtent2D srcExtent, RHITextureAspectFlagBits srcAspect, RHIResourceFormat srcFormat, RHITextureAspectFlagBits dstAspect, RHIResourceFormat dstFormat, uint32_t maxMips=16, uint32_t layer=0, RHIDeviceSampler::SamplerDesc samplerDesc={})
 
template<typename FSetup , typename FRecord >
PassHandle createPSFullscreenPass (Renderer *r, StringView name, FSetup &&setup, FRecord &&record)
 Creates a full-screen triangle pass that writes to the current backbuffer.
 
template<typename FSetup >
PassHandle createPSFullscreenPass (Renderer *r, StringView name, FSetup &&setup)
 
PassHandle createPSBackbufferBlitPass (Renderer *r, StringView name, ResourceHandle copy_sampler, ResourceHandle copy_source, RHIResourceFormat srcFormat=RHIResourceFormat::R8G8B8A8Unorm)
 Creates a full-screen triangle pass that renders a texture to the current backbuffer.
 

Function Documentation

◆ createCSClearBackBuffer()

PassHandle Foundation::RenderUtils::createCSClearBackBuffer ( Renderer r,
StringView  name,
float4  clearColor = {} 
)
inline

◆ createCSClearTexture()

PassHandle Foundation::RenderUtils::createCSClearTexture ( Renderer r,
StringView  name,
ResourceHandle  resource,
RHITextureViewDesc  viewDesc,
float4  clearColor 
)
inline

◆ createCSDebugTextPassBackBuffer()

PassHandle Foundation::RenderUtils::createCSDebugTextPassBackBuffer ( Renderer r,
StringView  name,
Span< const CSDebugTextData lines 
)
inline

@breif Draw debug text overlay on top of the existing backbuffer content This is a port of https://github.com/zeux/niagara/blob/master/src/shaders/debugtext.comp.glsl

◆ createCSMipGenerationPasses()

void Foundation::RenderUtils::createCSMipGenerationPasses ( Renderer renderer,
StringView  name,
RHIDeviceQueueType  queue,
ResourceHandle  src,
ResourceHandle  dst,
RHIExtent2D  srcExtent,
RHITextureAspectFlagBits  srcAspect,
RHIResourceFormat  srcFormat,
RHITextureAspectFlagBits  dstAspect,
RHIResourceFormat  dstFormat,
uint32_t  maxMips = 16,
uint32_t  layer = 0,
RHIDeviceSampler::SamplerDesc  samplerDesc = {} 
)
inline

◆ createPSBackbufferBlitPass()

PassHandle Foundation::RenderUtils::createPSBackbufferBlitPass ( Renderer r,
StringView  name,
ResourceHandle  copy_sampler,
ResourceHandle  copy_source,
RHIResourceFormat  srcFormat = RHIResourceFormat::R8G8B8A8Unorm 
)
inline

Creates a full-screen triangle pass that renders a texture to the current backbuffer.

◆ createPSFullscreenPass() [1/2]

template<typename FSetup >
PassHandle Foundation::RenderUtils::createPSFullscreenPass ( Renderer r,
StringView  name,
FSetup &&  setup 
)

◆ createPSFullscreenPass() [2/2]

PassHandle Foundation::RenderUtils::createPSFullscreenPass ( Renderer r,
StringView  name,
FSetup &&  setup,
FRecord &&  record 
)

Creates a full-screen triangle pass that writes to the current backbuffer.

Parameters
setupis called once during setup phase of the pass, after a fullscreen vertex stage is bound.
recordis called once per frame during execution phase of the pass, after the pipeline is set.