Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
castor3d::RenderTechniquePass Class Reference

#include <RenderTechniquePass.hpp>

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

Public Member Functions

virtual C3D_API void accept (RenderTechniqueVisitor &visitor)
 Visitor acceptance function. More...
 
C3D_API void update (GpuUpdater &updater) override
 Updates the render pass, GPU wise. More...
 
virtual C3D_API void update (CpuUpdater &updater)
 Updates the render pass, CPU wise. More...
 
virtual C3D_API void update (GpuUpdater &updater)
 Updates the render pass, GPU wise. More...
 
ashes::Semaphore const & getSemaphore () const
 
C3D_API ShaderFlags getShaderFlags () const override
 
Scene const & getScene ()
 
- Public Member Functions inherited from castor3d::RenderNodesPass
C3D_API ~RenderNodesPass () override
 Destructor. More...
 
virtual C3D_API void update (CpuUpdater &updater)
 Updates the render pass, CPU wise. More...
 
virtual C3D_API void update (GpuUpdater &updater)
 Updates the render pass, GPU wise. More...
 
C3D_API ShaderPtr getVertexShaderSource (PipelineFlags const &flags) const
 Retrieves the vertex shader source matching the given flags. More...
 
C3D_API ShaderPtr getHullShaderSource (PipelineFlags const &flags) const
 Retrieves the hull shader source matching the given flags. More...
 
C3D_API ShaderPtr getDomainShaderSource (PipelineFlags const &flags) const
 Retrieves the domain shader source matching the given flags. More...
 
C3D_API ShaderPtr getGeometryShaderSource (PipelineFlags const &flags) const
 Retrieves the geometry shader source matching the given flags. More...
 
C3D_API ShaderPtr getPixelShaderSource (PipelineFlags const &flags) const
 Retrieves the pixel shader source matching the given flags. More...
 
C3D_API PassFlags adjustFlags (PassFlags flags) const
 Adjusts given flags to match the render pass requirements. More...
 
C3D_API ProgramFlags adjustFlags (ProgramFlags flags) const
 Adjusts given flags to match the render pass requirements. More...
 
C3D_API SceneFlags adjustFlags (SceneFlags flags) const
 Adjusts given flags to match the render pass requirements. More...
 
C3D_API PipelineFlags createPipelineFlags (BlendMode colourBlendMode, BlendMode alphaBlendMode, PassFlags passFlags, RenderPassTypeID renderPassTypeID, PassTypeID passTypeID, uint32_t heightTextureIndex, VkCompareOp alphaFunc, VkCompareOp blendAlphaFunc, TextureFlagsArray const &textures, ProgramFlags const &programFlags, SceneFlags const &sceneFlags, VkPrimitiveTopology topology, bool isFrontCulled)
 Creates the pipeline flags for given configuration. More...
 
C3D_API PipelineFlags createPipelineFlags (Pass const &pass, TextureFlagsArray const &textures, ProgramFlags const &programFlags, SceneFlags const &sceneFlags, VkPrimitiveTopology topology, bool isFrontCulled)
 Creates the pipeline flags for given configuration. More...
 
C3D_API RenderPipelineprepareBackPipeline (PipelineFlags pipelineFlags, ashes::PipelineVertexInputStateCreateInfoCRefArray const &vertexLayouts)
 Prepares the pipeline matching the given flags, for back face culling nodes. More...
 
C3D_API RenderPipelineprepareFrontPipeline (PipelineFlags pipelineFlags, ashes::PipelineVertexInputStateCreateInfoCRefArray const &vertexLayouts)
 Prepares the pipeline matching the given flags, for front face culling nodes. More...
 
C3D_API void initialiseAdditionalDescriptor (RenderPipeline &pipeline, ShadowMapLightTypeArray const &shadowMaps)
 Initialises the additional descriptor set of a billboard node. More...
 
C3D_API FilteredTextureFlags filterTexturesFlags (TextureFlagsArray const &textures) const
 Filters the given textures flags using this pass needed textures. More...
 
C3D_API void setIgnoredNode (SceneNode const &node)
 Sets the node ignored node. More...
 
virtual C3D_API TextureFlags getTexturesMask () const
 
C3D_API bool isValidPass (Pass const &pass) const
 
C3D_API bool isValidRenderable (RenderedObject const &object) const
 
C3D_API bool hasNodes () const
 
C3D_API bool isPassEnabled () const
 
C3D_API ScenegetScene () const
 
C3D_API SceneNode const * getIgnoredNode () const
 
bool isOrderIndependent () const
 
SceneCuller const & getCuller () const
 
SceneCullergetCuller ()
 
SceneUbogetSceneUbo ()
 
SceneUbo const & getSceneUbo () const
 
MatrixUbogetMatrixUbo () const
 
uint32_t getPipelinesCount () const
 
bool isDirty () const
 
bool forceTwoSided () const
 
RenderMode getRenderMode () const
 
castor::String const & getTypeName () const
 
RenderPassTypeID getTypeID () const
 

Protected Member Functions

C3D_API RenderTechniquePass (RenderTechnique *parent, crg::FramePass const &pass, crg::GraphContext &context, crg::RunnableGraph &graph, RenderDevice const &device, castor::String const &typeName, castor::String const &category, castor::String const &name, RenderNodesPassDesc const &renderPassDesc, RenderTechniquePassDesc const &techniquePassDesc)
 Constructor. More...
 
C3D_API void doUpdateNodes (QueueRenderNodes &nodes, castor::Point2f const &jitter, RenderInfo &info)
 
C3D_API void doUpdateUbos (CpuUpdater &updater) override
 Updates the render pass, CPU wise. More...
 
C3D_API ProgramFlags doAdjustProgramFlags (ProgramFlags flags) const override
 
C3D_API SceneFlags doAdjustSceneFlags (SceneFlags flags) const override
 
C3D_API void doAddShadowBindings (ashes::VkDescriptorSetLayoutBindingArray &bindings, uint32_t &index) const
 
C3D_API void doAddEnvBindings (ashes::VkDescriptorSetLayoutBindingArray &bindings, uint32_t &index) const
 
C3D_API void doAddGIBindings (ashes::VkDescriptorSetLayoutBindingArray &bindings, uint32_t &index) const
 
C3D_API void doAddShadowDescriptor (ashes::WriteDescriptorSetArray &descriptorWrites, ShadowMapLightTypeArray const &shadowMaps, uint32_t &index) const
 
C3D_API void doAddEnvDescriptor (ashes::WriteDescriptorSetArray &descriptorWrites, ShadowMapLightTypeArray const &shadowMaps, uint32_t &index) const
 
C3D_API void doAddGIDescriptor (ashes::WriteDescriptorSetArray &descriptorWrites, ShadowMapLightTypeArray const &shadowMaps, uint32_t &index) const
 
- Protected Member Functions inherited from castor3d::RenderNodesPass
C3D_API RenderNodesPass (crg::FramePass const &pass, crg::GraphContext &context, crg::RunnableGraph &graph, RenderDevice const &device, castor::String const &typeName, castor::String const &category, castor::String const &name, RenderNodesPassDesc const &desc)
 Constructor. More...
 
C3D_API void doUpdate (SubmeshRenderNodesPtrByPipelineMap &nodes)
 Updates instantiated submeshes. More...
 
C3D_API void doUpdate (SubmeshRenderNodesPtrByPipelineMap &nodes, RenderInfo &info)
 Updates instantiated submeshes. More...
 
C3D_API void doUpdate (SubmeshRenderNodePtrByPipelineMap &nodes)
 Updates non instantiated submeshes. More...
 
C3D_API void doUpdate (SubmeshRenderNodePtrByPipelineMap &nodes, RenderInfo &info)
 Updates non instantiated submeshes. More...
 
C3D_API void doUpdate (BillboardRenderNodePtrByPipelineMap &nodes)
 Updates billboards. More...
 
C3D_API void doUpdate (BillboardRenderNodePtrByPipelineMap &nodes, RenderInfo &info)
 Updates billboards. More...
 
virtual C3D_API void doUpdate (RenderQueueArray &queues)
 Updates the specific data. More...
 
virtual C3D_API void doUpdateUbos (CpuUpdater &updater)
 Updates the render pass, CPU wise. More...
 
virtual C3D_API void doFillAdditionalBindings (ashes::VkDescriptorSetLayoutBindingArray &bindings) const =0
 Fills the render pass specific descriptor layout bindings. More...
 
virtual C3D_API bool doAreValidPassFlags (PassFlags const &passFlags) const
 
virtual C3D_API bool doIsValidPass (Pass const &pass) const
 
virtual C3D_API bool doIsValidRenderable (RenderedObject const &object) const
 
virtual C3D_API PassFlags doAdjustPassFlags (PassFlags flags) const
 
virtual C3D_API ProgramFlags doAdjustProgramFlags (ProgramFlags flags) const
 
virtual C3D_API SceneFlags doAdjustSceneFlags (SceneFlags flags) const
 
C3D_API ShaderProgramSPtr doGetProgram (PipelineFlags const &flags, VkCullModeFlags cullMode=VK_CULL_MODE_NONE)
 

Protected Attributes

RenderTechniquem_parent {}
 
Scene const & m_scene
 
Cameram_camera { nullptr }
 
bool m_environment { false }
 
bool m_hasVelocity { false }
 
SsaoConfig m_ssaoConfig
 
Texture const * m_ssao
 
LpvGridConfigUbo const * m_lpvConfigUbo
 
LayeredLpvGridConfigUbo const * m_llpvConfigUbo
 
VoxelizerUbo const * m_vctConfigUbo
 
LightVolumePassResult const * m_lpvResult
 
LightVolumePassResultArray const * m_llpvResult
 
Texture const * m_vctFirstBounce
 
Texture const * m_vctSecondaryBounce
 
ashes::SemaphorePtr m_finished
 
- Protected Attributes inherited from castor3d::RenderNodesPass
RenderDevice const & m_device
 
RenderSystemm_renderSystem
 
MatrixUbom_matrixUbo
 
SceneCullerm_culler
 
castor::String m_typeName
 
RenderPassTypeID m_typeID {}
 
RenderQueueUPtr m_renderQueue
 
castor::String m_category
 
castor::Size m_size
 
RenderMode m_mode { RenderMode::eBoth }
 
bool m_oit { false }
 
bool m_forceTwoSided { false }
 
bool m_safeBand { false }
 
bool m_isDirty { true }
 
SceneUbo m_sceneUbo
 
uint32_t m_index { 0u }
 
std::array< PassDescriptors, size_t(RenderNodeType::eCount) > m_additionalDescriptors
 

Additional Inherited Members

- Static Public Member Functions inherited from castor3d::RenderNodesPass
static C3D_API ashes::PipelineColorBlendStateCreateInfo createBlendState (BlendMode colourBlendMode, BlendMode alphaBlendMode, uint32_t attachesCount)
 Creates a blend state matching given blend modes. More...
 

Constructor & Destructor Documentation

◆ RenderTechniquePass()

C3D_API castor3d::RenderTechniquePass::RenderTechniquePass ( RenderTechnique parent,
crg::FramePass const &  pass,
crg::GraphContext &  context,
crg::RunnableGraph &  graph,
RenderDevice const &  device,
castor::String const &  typeName,
castor::String const &  category,
castor::String const &  name,
RenderNodesPassDesc const &  renderPassDesc,
RenderTechniquePassDesc const &  techniquePassDesc 
)
protected

Constructor.

Parameters
[in]parentThe parent technique.
[in]passThe parent frame pass.
[in]contextThe rendering context.
[in]graphThe runnable graph.
[in]deviceThe GPU device.
[in]typeNameThe pass type name.
[in]categoryThe pass category.
[in]nameThe pass name.
[in]renderPassDescThe scene render pass construction data.
[in]techniquePassDescThe technique render pass construction data.

Member Function Documentation

◆ accept()

virtual C3D_API void castor3d::RenderTechniquePass::accept ( RenderTechniqueVisitor visitor)
virtual

Visitor acceptance function.

Parameters
visitorThe ... visitor.

Reimplemented in castor3d::ForwardRenderTechniquePass, castor3d::OpaquePass, and castor3d::TransparentPass.

◆ doAddEnvBindings()

C3D_API void castor3d::RenderTechniquePass::doAddEnvBindings ( ashes::VkDescriptorSetLayoutBindingArray &  bindings,
uint32_t &  index 
) const
protected

◆ doAddEnvDescriptor()

C3D_API void castor3d::RenderTechniquePass::doAddEnvDescriptor ( ashes::WriteDescriptorSetArray &  descriptorWrites,
ShadowMapLightTypeArray const &  shadowMaps,
uint32_t &  index 
) const
protected

◆ doAddGIBindings()

C3D_API void castor3d::RenderTechniquePass::doAddGIBindings ( ashes::VkDescriptorSetLayoutBindingArray &  bindings,
uint32_t &  index 
) const
protected

◆ doAddGIDescriptor()

C3D_API void castor3d::RenderTechniquePass::doAddGIDescriptor ( ashes::WriteDescriptorSetArray &  descriptorWrites,
ShadowMapLightTypeArray const &  shadowMaps,
uint32_t &  index 
) const
protected

◆ doAddShadowBindings()

C3D_API void castor3d::RenderTechniquePass::doAddShadowBindings ( ashes::VkDescriptorSetLayoutBindingArray &  bindings,
uint32_t &  index 
) const
protected

◆ doAddShadowDescriptor()

C3D_API void castor3d::RenderTechniquePass::doAddShadowDescriptor ( ashes::WriteDescriptorSetArray &  descriptorWrites,
ShadowMapLightTypeArray const &  shadowMaps,
uint32_t &  index 
) const
protected

◆ doAdjustProgramFlags()

C3D_API ProgramFlags castor3d::RenderTechniquePass::doAdjustProgramFlags ( ProgramFlags  flags) const
overrideprotectedvirtual

Reimplemented from castor3d::RenderNodesPass.

◆ doAdjustSceneFlags()

C3D_API SceneFlags castor3d::RenderTechniquePass::doAdjustSceneFlags ( SceneFlags  flags) const
overrideprotectedvirtual

Reimplemented from castor3d::RenderNodesPass.

◆ doUpdateNodes()

C3D_API void castor3d::RenderTechniquePass::doUpdateNodes ( QueueRenderNodes nodes,
castor::Point2f const &  jitter,
RenderInfo info 
)
protected

◆ doUpdateUbos()

C3D_API void castor3d::RenderTechniquePass::doUpdateUbos ( CpuUpdater updater)
overrideprotectedvirtual

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

Reimplemented from castor3d::RenderNodesPass.

◆ getScene()

Scene const & castor3d::RenderTechniquePass::getScene ( )
inline

References m_scene.

◆ getSemaphore()

ashes::Semaphore const & castor3d::RenderTechniquePass::getSemaphore ( ) const
inline

name Getters.

References m_finished.

◆ getShaderFlags()

C3D_API ShaderFlags castor3d::RenderTechniquePass::getShaderFlags ( ) const
inlineoverridevirtual

◆ update() [1/3]

virtual C3D_API void castor3d::RenderNodesPass::update ( CpuUpdater updater)
virtual

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

Reimplemented from castor3d::RenderNodesPass.

◆ update() [2/3]

virtual C3D_API void castor3d::RenderNodesPass::update ( GpuUpdater updater)
virtual

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

Reimplemented from castor3d::RenderNodesPass.

◆ update() [3/3]

C3D_API void castor3d::RenderTechniquePass::update ( GpuUpdater updater)
overridevirtual

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

Reimplemented from castor3d::RenderNodesPass.

Member Data Documentation

◆ m_camera

Camera* castor3d::RenderTechniquePass::m_camera { nullptr }
protected

◆ m_environment

bool castor3d::RenderTechniquePass::m_environment { false }
protected

◆ m_finished

ashes::SemaphorePtr castor3d::RenderTechniquePass::m_finished
protected

Referenced by getSemaphore().

◆ m_hasVelocity

bool castor3d::RenderTechniquePass::m_hasVelocity { false }
protected

Referenced by getShaderFlags().

◆ m_llpvConfigUbo

LayeredLpvGridConfigUbo const* castor3d::RenderTechniquePass::m_llpvConfigUbo
protected

◆ m_llpvResult

LightVolumePassResultArray const* castor3d::RenderTechniquePass::m_llpvResult
protected

◆ m_lpvConfigUbo

LpvGridConfigUbo const* castor3d::RenderTechniquePass::m_lpvConfigUbo
protected

◆ m_lpvResult

LightVolumePassResult const* castor3d::RenderTechniquePass::m_lpvResult
protected

◆ m_parent

RenderTechnique* castor3d::RenderTechniquePass::m_parent {}
protected

◆ m_scene

Scene const& castor3d::RenderTechniquePass::m_scene
protected

Referenced by getScene().

◆ m_ssao

Texture const* castor3d::RenderTechniquePass::m_ssao
protected

◆ m_ssaoConfig

SsaoConfig castor3d::RenderTechniquePass::m_ssaoConfig
protected

◆ m_vctConfigUbo

VoxelizerUbo const* castor3d::RenderTechniquePass::m_vctConfigUbo
protected

◆ m_vctFirstBounce

Texture const* castor3d::RenderTechniquePass::m_vctFirstBounce
protected

◆ m_vctSecondaryBounce

Texture const* castor3d::RenderTechniquePass::m_vctSecondaryBounce
protected

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