Lysa  0.0
Lysa 3D Engine
PostProcessing Class Reference
+ Inheritance diagram for PostProcessing:

Classes

struct  FrameData
 
struct  PostProcessingParams
 

Public Member Functions

 PostProcessing (const RenderingConfiguration &config, const std::string &fragShaderName, vireo::ImageFormat outputFormat, void *data, uint32 dataSize, const std::string &name)
 
void update (uint32 frameIndex) override
 
void render (uint32 frameIndex, const vireo::Viewport &viewport, const vireo::Rect &scissor, const std::shared_ptr< vireo::RenderTarget > &colorAttachment, const std::shared_ptr< vireo::RenderTarget > &depthAttachment, const std::shared_ptr< vireo::RenderTarget > &bloomColorAttachment, vireo::CommandList &commandList)
 
void resize (const vireo::Extent &extent, const std::shared_ptr< vireo::CommandList > &commandList) override
 
virtual std::shared_ptr< vireo::RenderTarget > getColorAttachment (const uint32 frameIndex)
 
const auto & getFragShaderName () const
 
- Public Member Functions inherited from Renderpass
 Renderpass (const RenderingConfiguration &config, const std::string &name)
 
virtual ~Renderpass () = default
 
 Renderpass (Renderpass &) = delete
 
Renderpass & operator= (Renderpass &) = delete
 

Static Public Attributes

static const std::string VERTEX_SHADER {"quad.vert"}
 
static constexpr vireo::DescriptorIndex BINDING_PARAMS {0}
 
static constexpr vireo::DescriptorIndex BINDING_DATA {1}
 
static constexpr vireo::DescriptorIndex BINDING_TEXTURES {2}
 
static constexpr int INPUT_BUFFER {0}
 
static constexpr int DEPTH_BUFFER {1}
 
static constexpr int BLOOM_BUFFER {2}
 
static constexpr int TEXTURES_COUNT {BLOOM_BUFFER+1}
 

Protected Attributes

vireo::GraphicPipelineConfiguration pipelineConfig
 
vireo::RenderingConfiguration renderingConfig
 
const std::string fragShaderName
 
void * data {nullptr}
 
std::shared_ptr< vireo::Buffer > dataUniform {nullptr}
 
std::vector< FrameDataframesData
 
std::vector< std::shared_ptr< vireo::Image > > textures
 
std::shared_ptr< vireo::DescriptorLayout > descriptorLayout
 
std::shared_ptr< vireo::GraphicPipeline > pipeline
 
- Protected Attributes inherited from Renderpass
const std::string name
 
const RenderingConfigurationconfig
 

Additional Inherited Members

- Protected Member Functions inherited from Renderpass
std::shared_ptr< vireo::ShaderModule > loadShader (const std::string &shaderName) const
 

Constructor & Destructor Documentation

PostProcessing ( const RenderingConfiguration config,
const std::string &  fragShaderName,
vireo::ImageFormat  outputFormat,
void *  data,
uint32  dataSize,
const std::string &  name 
)

Member Function Documentation

virtual std::shared_ptr<vireo::RenderTarget> getColorAttachment ( const uint32  frameIndex)
inlinevirtual
const auto& getFragShaderName ( ) const
inline
void render ( uint32  frameIndex,
const vireo::Viewport &  viewport,
const vireo::Rect &  scissor,
const std::shared_ptr< vireo::RenderTarget > &  colorAttachment,
const std::shared_ptr< vireo::RenderTarget > &  depthAttachment,
const std::shared_ptr< vireo::RenderTarget > &  bloomColorAttachment,
vireo::CommandList &  commandList 
)
void resize ( const vireo::Extent &  extent,
const std::shared_ptr< vireo::CommandList > &  commandList 
)
overridevirtual

Recreate pass resources after a resize (default: no-op).

Reimplemented from lysa::Renderpass::resize()

void update ( uint32  frameIndex)
overridevirtual

Update any per-frame state (default: no-op).

Reimplemented from lysa::Renderpass::update()

Member Data Documentation

constexpr vireo::DescriptorIndex BINDING_DATA {1}
staticconstexpr
constexpr vireo::DescriptorIndex BINDING_PARAMS {0}
staticconstexpr
constexpr vireo::DescriptorIndex BINDING_TEXTURES {2}
staticconstexpr
constexpr int BLOOM_BUFFER {2}
staticconstexpr
void* data {nullptr}
protected
std::shared_ptr<vireo::Buffer> dataUniform {nullptr}
protected
constexpr int DEPTH_BUFFER {1}
staticconstexpr
std::shared_ptr<vireo::DescriptorLayout> descriptorLayout
protected
const std::string fragShaderName
protected
std::vector<FrameData> framesData
protected
constexpr int INPUT_BUFFER {0}
staticconstexpr
std::shared_ptr<vireo::GraphicPipeline> pipeline
protected
vireo::GraphicPipelineConfiguration pipelineConfig
protected
Initial value:
{
.colorBlendDesc = {{}}
}
vireo::RenderingConfiguration renderingConfig
protected
Initial value:
{
.colorRenderTargets = {{}}
}
std::vector<std::shared_ptr<vireo::Image> > textures
protected
constexpr int TEXTURES_COUNT {BLOOM_BUFFER+1}
staticconstexpr
const std::string VERTEX_SHADER {"quad.vert"}
inlinestatic