Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CPostprocManager Class Reference

#include <PostprocManager.h>

Collaboration diagram for CPostprocManager:

Classes

struct  BlurScale
 

Public Member Functions

 CPostprocManager (Renderer::Backend::IDevice *device)
 
 ~CPostprocManager ()
 
bool IsEnabled () const
 
void Initialize ()
 
void Resize ()
 
const CStrW & GetPostEffect () const
 
void SetPostEffect (const CStrW &name)
 
void UpdateAntiAliasingTechnique ()
 
void UpdateSharpeningTechnique ()
 
void UpdateSharpnessFactor ()
 
void SetUpscaleTechnique (const CStr &upscaleName)
 
void SetDepthBufferClipPlanes (float nearPlane, float farPlane)
 
Renderer::Backend::IFramebufferPrepareAndGetOutputFramebuffer ()
 
void ApplyPostproc (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
void BlitOutputFramebuffer (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IFramebuffer *destination)
 
bool IsMultisampleEnabled () const
 
void ResolveMultisampleFramebuffer (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
float GetScale () const
 

Static Public Member Functions

static std::vector< CStrW > GetPostEffects ()
 

Private Member Functions

void CreateMultisampleBuffer ()
 
void DestroyMultisampleBuffer ()
 
void RecalculateSize (const uint32_t width, const uint32_t height)
 
bool ShouldUpscale () const
 
bool ShouldDownscale () const
 
void UpscaleTextureByCompute (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, CShaderTechnique *shaderTechnique, Renderer::Backend::ITexture *source, Renderer::Backend::ITexture *destination)
 
void UpscaleTextureByFullscreenQuad (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, CShaderTechnique *shaderTechnique, Renderer::Backend::ITexture *source, Renderer::Backend::IFramebuffer *destination)
 
void ApplySharpnessAfterScale (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, CShaderTechnique *shaderTechnique, Renderer::Backend::ITexture *source, Renderer::Backend::ITexture *destination)
 
void DownscaleTextureByCompute (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, CShaderTechnique *shaderTechnique, Renderer::Backend::ITexture *source, Renderer::Backend::ITexture *destination)
 
void ApplyBlur (Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
 
void ApplyBlurDownscale2x (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IFramebuffer *framebuffer, Renderer::Backend::ITexture *inTex, int inWidth, int inHeight)
 
void ApplyBlurGauss (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::ITexture *inTex, Renderer::Backend::ITexture *tempTex, Renderer::Backend::IFramebuffer *tempFramebuffer, Renderer::Backend::IFramebuffer *outFramebuffer, int inWidth, int inHeight)
 
void ApplyEffect (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderTechniquePtr &shaderTech, int pass)
 
void Cleanup ()
 
void RecreateBuffers ()
 

Private Attributes

Renderer::Backend::IDevicem_Device = nullptr
 
std::unique_ptr< Renderer::Backend::IFramebufferm_CaptureFramebuffer
 
std::unique_ptr< Renderer::Backend::IFramebufferm_PingFramebuffer
 
std::unique_ptr< Renderer::Backend::IFramebufferm_PongFramebuffer
 
std::unique_ptr< Renderer::Backend::ITexturem_ColorTex1
 
std::unique_ptr< Renderer::Backend::ITexturem_ColorTex2
 
std::unique_ptr< Renderer::Backend::ITexturem_UnscaledTexture1
 
std::unique_ptr< Renderer::Backend::ITexturem_UnscaledTexture2
 
std::unique_ptr< Renderer::Backend::IFramebufferm_UnscaledFramebuffer1
 
std::unique_ptr< Renderer::Backend::IFramebufferm_UnscaledFramebuffer2
 
float m_Scale = 1.0f
 
std::unique_ptr< Renderer::Backend::ITexturem_DepthTex
 
float m_NearPlane
 
float m_FarPlane
 
std::array< BlurScale, 3 > m_BlurScales
 
bool m_WhichBuffer
 
Renderer::Backend::IVertexInputLayoutm_VertexInputLayout = nullptr
 
CStrW m_PostProcEffect
 
CShaderTechniquePtr m_PostProcTech
 
CStr m_SharpName
 
CShaderTechniquePtr m_SharpTech
 
float m_Sharpness
 
CShaderTechniquePtr m_UpscaleTech
 
CShaderTechniquePtr m_UpscaleComputeTech
 
CShaderTechniquePtr m_DownscaleComputeTech
 
CShaderTechniquePtr m_RCASComputeTech
 
CStr m_AAName
 
CShaderTechniquePtr m_AATech
 
bool m_UsingMultisampleBuffer
 
std::unique_ptr< Renderer::Backend::IFramebufferm_MultisampleFramebuffer
 
std::unique_ptr< Renderer::Backend::ITexturem_MultisampleColorTex
 
std::unique_ptr< Renderer::Backend::ITexturem_MultisampleDepthTex
 
uint32_t m_MultisampleCount
 
std::vector< uint32_tm_AllowedSampleCounts
 
uint32_t m_Width
 
uint32_t m_Height
 
uint32_t m_UnscaledWidth
 
uint32_t m_UnscaledHeight
 
bool m_IsInitialized
 

Constructor & Destructor Documentation

◆ CPostprocManager()

CPostprocManager::CPostprocManager ( Renderer::Backend::IDevice device)

◆ ~CPostprocManager()

CPostprocManager::~CPostprocManager ( )

Member Function Documentation

◆ ApplyBlur()

void CPostprocManager::ApplyBlur ( Renderer::Backend::IDeviceCommandContext deviceCommandContext)
private

◆ ApplyBlurDownscale2x()

void CPostprocManager::ApplyBlurDownscale2x ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
Renderer::Backend::IFramebuffer framebuffer,
Renderer::Backend::ITexture inTex,
int  inWidth,
int  inHeight 
)
private

◆ ApplyBlurGauss()

void CPostprocManager::ApplyBlurGauss ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
Renderer::Backend::ITexture inTex,
Renderer::Backend::ITexture tempTex,
Renderer::Backend::IFramebuffer tempFramebuffer,
Renderer::Backend::IFramebuffer outFramebuffer,
int  inWidth,
int  inHeight 
)
private

◆ ApplyEffect()

void CPostprocManager::ApplyEffect ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
const CShaderTechniquePtr shaderTech,
int  pass 
)
private

◆ ApplyPostproc()

void CPostprocManager::ApplyPostproc ( Renderer::Backend::IDeviceCommandContext deviceCommandContext)

◆ ApplySharpnessAfterScale()

void CPostprocManager::ApplySharpnessAfterScale ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
CShaderTechnique shaderTechnique,
Renderer::Backend::ITexture source,
Renderer::Backend::ITexture destination 
)
private

◆ BlitOutputFramebuffer()

void CPostprocManager::BlitOutputFramebuffer ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
Renderer::Backend::IFramebuffer destination 
)

◆ Cleanup()

void CPostprocManager::Cleanup ( )
private

◆ CreateMultisampleBuffer()

void CPostprocManager::CreateMultisampleBuffer ( )
private

◆ DestroyMultisampleBuffer()

void CPostprocManager::DestroyMultisampleBuffer ( )
private

◆ DownscaleTextureByCompute()

void CPostprocManager::DownscaleTextureByCompute ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
CShaderTechnique shaderTechnique,
Renderer::Backend::ITexture source,
Renderer::Backend::ITexture destination 
)
private

◆ GetPostEffect()

const CStrW & CPostprocManager::GetPostEffect ( ) const
inline

◆ GetPostEffects()

std::vector< CStrW > CPostprocManager::GetPostEffects ( )
static

◆ GetScale()

float CPostprocManager::GetScale ( ) const
inline

◆ Initialize()

void CPostprocManager::Initialize ( )

◆ IsEnabled()

bool CPostprocManager::IsEnabled ( ) const

◆ IsMultisampleEnabled()

bool CPostprocManager::IsMultisampleEnabled ( ) const

◆ PrepareAndGetOutputFramebuffer()

Renderer::Backend::IFramebuffer * CPostprocManager::PrepareAndGetOutputFramebuffer ( )

◆ RecalculateSize()

void CPostprocManager::RecalculateSize ( const uint32_t  width,
const uint32_t  height 
)
private

◆ RecreateBuffers()

void CPostprocManager::RecreateBuffers ( )
private

◆ Resize()

void CPostprocManager::Resize ( )

◆ ResolveMultisampleFramebuffer()

void CPostprocManager::ResolveMultisampleFramebuffer ( Renderer::Backend::IDeviceCommandContext deviceCommandContext)

◆ SetDepthBufferClipPlanes()

void CPostprocManager::SetDepthBufferClipPlanes ( float  nearPlane,
float  farPlane 
)

◆ SetPostEffect()

void CPostprocManager::SetPostEffect ( const CStrW &  name)

◆ SetUpscaleTechnique()

void CPostprocManager::SetUpscaleTechnique ( const CStr &  upscaleName)

◆ ShouldDownscale()

bool CPostprocManager::ShouldDownscale ( ) const
private

◆ ShouldUpscale()

bool CPostprocManager::ShouldUpscale ( ) const
private

◆ UpdateAntiAliasingTechnique()

void CPostprocManager::UpdateAntiAliasingTechnique ( )

◆ UpdateSharpeningTechnique()

void CPostprocManager::UpdateSharpeningTechnique ( )

◆ UpdateSharpnessFactor()

void CPostprocManager::UpdateSharpnessFactor ( )

◆ UpscaleTextureByCompute()

void CPostprocManager::UpscaleTextureByCompute ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
CShaderTechnique shaderTechnique,
Renderer::Backend::ITexture source,
Renderer::Backend::ITexture destination 
)
private

◆ UpscaleTextureByFullscreenQuad()

void CPostprocManager::UpscaleTextureByFullscreenQuad ( Renderer::Backend::IDeviceCommandContext deviceCommandContext,
CShaderTechnique shaderTechnique,
Renderer::Backend::ITexture source,
Renderer::Backend::IFramebuffer destination 
)
private

Member Data Documentation

◆ m_AAName

CStr CPostprocManager::m_AAName
private

◆ m_AATech

CShaderTechniquePtr CPostprocManager::m_AATech
private

◆ m_AllowedSampleCounts

std::vector<uint32_t> CPostprocManager::m_AllowedSampleCounts
private

◆ m_BlurScales

std::array<BlurScale, 3> CPostprocManager::m_BlurScales
private

◆ m_CaptureFramebuffer

std::unique_ptr<Renderer::Backend::IFramebuffer> CPostprocManager::m_CaptureFramebuffer
private

◆ m_ColorTex1

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_ColorTex1
private

◆ m_ColorTex2

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_ColorTex2
private

◆ m_DepthTex

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_DepthTex
private

◆ m_Device

Renderer::Backend::IDevice* CPostprocManager::m_Device = nullptr
private

◆ m_DownscaleComputeTech

CShaderTechniquePtr CPostprocManager::m_DownscaleComputeTech
private

◆ m_FarPlane

float CPostprocManager::m_FarPlane
private

◆ m_Height

uint32_t CPostprocManager::m_Height
private

◆ m_IsInitialized

bool CPostprocManager::m_IsInitialized
private

◆ m_MultisampleColorTex

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_MultisampleColorTex
private

◆ m_MultisampleCount

uint32_t CPostprocManager::m_MultisampleCount
private

◆ m_MultisampleDepthTex

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_MultisampleDepthTex
private

◆ m_MultisampleFramebuffer

std::unique_ptr<Renderer::Backend::IFramebuffer> CPostprocManager::m_MultisampleFramebuffer
private

◆ m_NearPlane

float CPostprocManager::m_NearPlane
private

◆ m_PingFramebuffer

std::unique_ptr<Renderer::Backend::IFramebuffer> CPostprocManager::m_PingFramebuffer
private

◆ m_PongFramebuffer

std::unique_ptr<Renderer::Backend::IFramebuffer> CPostprocManager::m_PongFramebuffer
private

◆ m_PostProcEffect

CStrW CPostprocManager::m_PostProcEffect
private

◆ m_PostProcTech

CShaderTechniquePtr CPostprocManager::m_PostProcTech
private

◆ m_RCASComputeTech

CShaderTechniquePtr CPostprocManager::m_RCASComputeTech
private

◆ m_Scale

float CPostprocManager::m_Scale = 1.0f
private

◆ m_SharpName

CStr CPostprocManager::m_SharpName
private

◆ m_Sharpness

float CPostprocManager::m_Sharpness
private

◆ m_SharpTech

CShaderTechniquePtr CPostprocManager::m_SharpTech
private

◆ m_UnscaledFramebuffer1

std::unique_ptr<Renderer::Backend::IFramebuffer> CPostprocManager::m_UnscaledFramebuffer1
private

◆ m_UnscaledFramebuffer2

std::unique_ptr<Renderer::Backend::IFramebuffer> CPostprocManager::m_UnscaledFramebuffer2
private

◆ m_UnscaledHeight

uint32_t CPostprocManager::m_UnscaledHeight
private

◆ m_UnscaledTexture1

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_UnscaledTexture1
private

◆ m_UnscaledTexture2

std::unique_ptr<Renderer::Backend::ITexture> CPostprocManager::m_UnscaledTexture2
private

◆ m_UnscaledWidth

uint32_t CPostprocManager::m_UnscaledWidth
private

◆ m_UpscaleComputeTech

CShaderTechniquePtr CPostprocManager::m_UpscaleComputeTech
private

◆ m_UpscaleTech

CShaderTechniquePtr CPostprocManager::m_UpscaleTech
private

◆ m_UsingMultisampleBuffer

bool CPostprocManager::m_UsingMultisampleBuffer
private

◆ m_VertexInputLayout

Renderer::Backend::IVertexInputLayout* CPostprocManager::m_VertexInputLayout = nullptr
private

◆ m_WhichBuffer

bool CPostprocManager::m_WhichBuffer
private

◆ m_Width

uint32_t CPostprocManager::m_Width
private

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