Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
castor3d::PostEffect Class Referenceabstract

#include <PostEffect.hpp>

Inheritance diagram for castor3d::PostEffect:
Inheritance graph
[legend]
Collaboration diagram for castor3d::PostEffect:
Collaboration graph
[legend]

Public Types

enum class  Kind { eHDR , eSRGB , eOverlay }
 

Public Member Functions

virtual C3D_API ~PostEffect ()
 Destructor. More...
 
C3D_API bool writeInto (castor::StringStream &file, castor::String const &tabs)
 Writes the effect into a text file. More...
 
C3D_API bool initialise (castor3d::RenderDevice const &device, crg::ImageViewId const &texture, crg::FramePass const &previousPass)
 Initialisation function. More...
 
C3D_API void cleanup (castor3d::RenderDevice const &device)
 Cleanup function. More...
 
C3D_API void update (CpuUpdater &updater)
 
C3D_API void update (GpuUpdater &updater)
 
virtual C3D_API void accept (PipelineVisitorBase &visitor)=0
 Visitor acceptance function. More...
 
void enable (bool value)
 
virtual C3D_API crg::FramePass const & getPass () const =0
 
virtual C3D_API void setParameters (Parameters parameters)=0
 
bool isAfterToneMapping () const
 
crg::ImageViewId const & getResult () const
 
castor::String const & getFullName () const
 
bool const & isEnabled () const
 

Protected Member Functions

C3D_API PostEffect (castor::String const &name, castor::String const &groupName, castor::String const &fullName, RenderTarget &renderTarget, RenderSystem &renderSystem, Parameters const &parameters, uint32_t passesCount=1u, Kind kind=Kind::eHDR)
 Constructor. More...
 
C3D_API void doCopyImage (crg::RunnableGraph &graph, crg::RunnablePass const &runnable, crg::RecordContext &context, VkCommandBuffer commandBuffer, uint32_t index, crg::ImageViewId const &source, crg::ImageViewId const &target)
 

Protected Attributes

castor::String m_fullName
 
RenderTargetm_renderTarget
 
crg::FramePassGroup & m_graph
 
uint32_t m_passesCount { 1u }
 
Kind m_kind { Kind::eHDR }
 
crg::ImageViewId const * m_target { nullptr }
 
crg::ImageViewId const * m_result { nullptr }
 
bool m_enabled
 

Member Enumeration Documentation

◆ Kind

enum class castor3d::PostEffect::Kind
strong
Enumerator
eHDR 
eSRGB 
eOverlay 

Constructor & Destructor Documentation

◆ PostEffect()

C3D_API castor3d::PostEffect::PostEffect ( castor::String const &  name,
castor::String const &  groupName,
castor::String const &  fullName,
RenderTarget renderTarget,
RenderSystem renderSystem,
Parameters const &  parameters,
uint32_t  passesCount = 1u,
Kind  kind = Kind::eHDR 
)
protected

Constructor.

Parameters
[in]nameThe effect name.
[in]groupNameThe effect passes group name.
[in]fullNameThe effect full (fancy) name.
[in]renderTargetThe render target to which is attached this effect.
[in]renderSystemThe render system.
[in]parametersThe optional parameters.
[in]passesCountThe number of passes for this post effect.
[in]kindThe post effect kind.

◆ ~PostEffect()

virtual C3D_API castor3d::PostEffect::~PostEffect ( )
virtual

Destructor.

Member Function Documentation

◆ accept()

virtual C3D_API void castor3d::PostEffect::accept ( PipelineVisitorBase visitor)
pure virtual

Visitor acceptance function.

Parameters
visitorThe ... visitor.

◆ cleanup()

C3D_API void castor3d::PostEffect::cleanup ( castor3d::RenderDevice const &  device)

Cleanup function.

Parameters
[in]deviceThe GPU device.

◆ doCopyImage()

C3D_API void castor3d::PostEffect::doCopyImage ( crg::RunnableGraph &  graph,
crg::RunnablePass const &  runnable,
crg::RecordContext &  context,
VkCommandBuffer  commandBuffer,
uint32_t  index,
crg::ImageViewId const &  source,
crg::ImageViewId const &  target 
)
protected

◆ enable()

void castor3d::PostEffect::enable ( bool  value)
inline

name Mutators.

References m_enabled.

◆ getFullName()

castor::String const & castor3d::PostEffect::getFullName ( ) const
inline

References m_fullName.

◆ getPass()

virtual C3D_API crg::FramePass const & castor3d::PostEffect::getPass ( ) const
pure virtual

name Getters.

◆ getResult()

crg::ImageViewId const & castor3d::PostEffect::getResult ( ) const
inline

References m_result.

◆ initialise()

C3D_API bool castor3d::PostEffect::initialise ( castor3d::RenderDevice const &  device,
crg::ImageViewId const &  texture,
crg::FramePass const &  previousPass 
)

Initialisation function.

Parameters
[in]deviceThe GPU device.
[in]textureThe target texture.
[in]previousPassThe previous frame pass.
Returns
true if ok.

◆ isAfterToneMapping()

bool castor3d::PostEffect::isAfterToneMapping ( ) const
inline

References eSRGB, and m_kind.

◆ isEnabled()

bool const & castor3d::PostEffect::isEnabled ( ) const
inline

References m_enabled.

◆ setParameters()

virtual C3D_API void castor3d::PostEffect::setParameters ( Parameters  parameters)
pure virtual

◆ update() [1/2]

C3D_API void castor3d::PostEffect::update ( CpuUpdater updater)
Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

C3D_API void castor3d::PostEffect::update ( GpuUpdater updater)
Parameters
[in,out]updaterThe update data.

◆ writeInto()

C3D_API bool castor3d::PostEffect::writeInto ( castor::StringStream &  file,
castor::String const &  tabs 
)

Writes the effect into a text file.

Parameters
[in]fileThe file.
[in]tabsThe current indentation.

Member Data Documentation

◆ m_enabled

bool castor3d::PostEffect::m_enabled
protected

Referenced by enable(), and isEnabled().

◆ m_fullName

castor::String castor3d::PostEffect::m_fullName
protected

Referenced by getFullName().

◆ m_graph

crg::FramePassGroup& castor3d::PostEffect::m_graph
protected

◆ m_kind

Kind castor3d::PostEffect::m_kind { Kind::eHDR }
protected

Referenced by isAfterToneMapping().

◆ m_passesCount

uint32_t castor3d::PostEffect::m_passesCount { 1u }
protected

◆ m_renderTarget

RenderTarget& castor3d::PostEffect::m_renderTarget
protected

◆ m_result

crg::ImageViewId const* castor3d::PostEffect::m_result { nullptr }
protected

Referenced by getResult().

◆ m_target

crg::ImageViewId const* castor3d::PostEffect::m_target { nullptr }
protected

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