Castor3D 0.17.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
castor3d::NodesPass Class Referenceabstract

#include <NodesPass.hpp>

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

Public Member Functions

virtual ~NodesPass () noexcept=default
 
C3D_API void update (CpuUpdater &updater)
 Updates the render pass, CPU wise.
 
C3D_API SubmeshComponentCombine adjustFlags (SubmeshComponentCombine const &submeshCombine) const
 Adjusts given flags to match the render pass requirements.
 
C3D_API PassComponentCombine adjustFlags (PassComponentCombine const &passCombine) const
 Adjusts given flags to match the render pass requirements.
 
C3D_API TextureCombine adjustFlags (TextureCombine const &textureCombine) const
 Filters the given textures flags using this pass needed textures.
 
C3D_API SceneFlags adjustFlags (SceneFlags flags) const
 Adjusts given flags to match the render pass requirements.
 
C3D_API bool areValidPassFlags (PassComponentCombine const &passFlags) const noexcept
 
virtual C3D_API bool isPassEnabled () const noexcept
 
C3D_API bool isValidPass (Pass const &pass) const noexcept
 
C3D_API bool isValidRenderable (RenderedObject const &object) const noexcept
 
C3D_API bool isValidNode (SceneNode const &node) const noexcept
 
ComponentModeFlags getComponentsMask () const noexcept
 
bool isDirty () const noexcept
 
RenderFilters getRenderFilters () const noexcept
 
castor::String const & getTypeName () const noexcept
 
RenderPassTypeID getTypeID () const noexcept
 
bool filtersStatic () const noexcept
 
bool filtersNonStatic () const noexcept
 
bool handleStatic () const noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const noexcept
 
void setOwner (Engine &owner) noexcept
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 

Static Public Member Functions

static C3D_API void addShadowBindings (SceneFlags const &sceneFlags, ashes::VkDescriptorSetLayoutBindingArray &bindings, VkShaderStageFlags shaderStages, uint32_t &index)
 Adds shadow maps descriptor layout bindings to given list.
 
static C3D_API void addShadowBindings (ashes::VkDescriptorSetLayoutBindingArray &bindings, VkShaderStageFlags shaderStages, uint32_t &index)
 Adds shadow maps descriptor layout bindings to given list.
 
static C3D_API void addBackgroundBindings (SceneBackground const &background, ashes::VkDescriptorSetLayoutBindingArray &bindings, VkShaderStageFlags shaderStages, uint32_t &index)
 Adds background descriptor layout bindings to given list.
 
static C3D_API void addGIBindings (SceneFlags flags, IndirectLightingData const &indirectLighting, ashes::VkDescriptorSetLayoutBindingArray &bindings, VkShaderStageFlags shaderStages, uint32_t &index)
 Adds indirect lighting descriptor layout bindings to given list.
 
static C3D_API void addClusteredLightingBindings (FrustumClusters const &frustumClusters, ashes::VkDescriptorSetLayoutBindingArray &bindings, VkShaderStageFlags shaderStages, uint32_t &index)
 Adds clusters descriptor layout bindings to given list.
 
static C3D_API void addShadowDescriptor (RenderSystem const &renderSystem, crg::RunnableGraph &graph, ashes::WriteDescriptorSetArray &descriptorWrites, ShadowMapLightTypeArray const &shadowMaps, ShadowBuffer const &shadowBuffer, uint32_t &index)
 
static C3D_API void addShadowDescriptor (RenderSystem const &renderSystem, crg::RunnableGraph &graph, SceneFlags const &sceneFlags, ashes::WriteDescriptorSetArray &descriptorWrites, ShadowMapLightTypeArray const &shadowMaps, ShadowBuffer const &shadowBuffer, uint32_t &index)
 
static C3D_API void addBackgroundDescriptor (SceneBackground const &background, ashes::WriteDescriptorSetArray &descriptorWrites, crg::ImageViewIdArray const &targetImage, uint32_t &index)
 
static C3D_API void addGIDescriptor (SceneFlags sceneFlags, IndirectLightingData const &indirectLighting, ashes::WriteDescriptorSetArray &descriptorWrites, uint32_t &index)
 
static C3D_API void addClusteredLightingDescriptor (FrustumClusters const &frustumClusters, ashes::WriteDescriptorSetArray &descriptorWrites, uint32_t &index)
 

Public Attributes

NodesPassChangeSignal onSortNodes
 

Protected Member Functions

C3D_API NodesPass (RenderDevice const &device, castor::String const &categoryName, castor::String const &typeName, castor::String const &fullName, crg::ImageViewIdArray targetImage, crg::ImageViewIdArray targetDepth, NodesPassDesc const &desc)
 Constructor.
 
virtual C3D_API void doUpdate (CpuUpdater &updater)=0
 Updates the render pass, CPU wise.
 
virtual C3D_API bool doIsValidPass (Pass const &pass) const noexcept
 
virtual C3D_API bool doIsValidRenderable (RenderedObject const &object) const noexcept
 
virtual C3D_API SubmeshComponentCombine doAdjustSubmeshComponents (SubmeshComponentCombine submeshCombine) const
 
virtual C3D_API SceneFlags doAdjustSceneFlags (SceneFlags flags) const
 
virtual C3D_API bool doAreValidPassFlags (PassComponentCombine const &passFlags) const noexcept=0
 
virtual C3D_API bool doIsValidNode (SceneNode const &node) const noexcept=0
 
- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner) noexcept
 Constructor.
 

Protected Attributes

RenderDevice const & m_device
 
RenderSystemm_renderSystem
 
CameraUbo const & m_cameraUbo
 
crg::ImageViewIdArray m_targetImage
 
crg::ImageViewIdArray m_targetDepth
 
castor::String m_typeName
 
RenderPassTypeID m_typeID {}
 
RenderFilters m_filters { RenderFilter::eNone }
 
castor::String m_category
 
castor::Size m_size
 
bool m_safeBand { false }
 
bool m_isDirty { true }
 
SceneUbo const * m_sceneUbo {}
 
uint32_t m_index { 0u }
 
std::optional< bool > m_handleStatic { std::nullopt }
 
ComponentModeFlags m_componentsMask {}
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Constructor & Destructor Documentation

◆ NodesPass()

C3D_API castor3d::NodesPass::NodesPass ( RenderDevice const & device,
castor::String const & categoryName,
castor::String const & typeName,
castor::String const & fullName,
crg::ImageViewIdArray targetImage,
crg::ImageViewIdArray targetDepth,
NodesPassDesc const & desc )
protected

Constructor.

Parameters
[in]deviceThe GPU device.
[in]categoryNameThe category name.
[in]typeNameThe type name.
[in]fullNameThe pass name.
[in]targetImageThe image this pass renders to.
[in]targetDepthThe depth image this pass renders to.
[in]descThe construction data.

◆ ~NodesPass()

virtual castor3d::NodesPass::~NodesPass ( )
virtualdefaultnoexcept

Member Function Documentation

◆ addBackgroundBindings()

static C3D_API void castor3d::NodesPass::addBackgroundBindings ( SceneBackground const & background,
ashes::VkDescriptorSetLayoutBindingArray & bindings,
VkShaderStageFlags shaderStages,
uint32_t & index )
static

Adds background descriptor layout bindings to given list.

Parameters
[in]backgroundThe background.
[in,out]bindingsReceives the bindings.
[in]shaderStagesThe impacted shader stages.
[in,out]indexThe current binding index.

◆ addBackgroundDescriptor()

static C3D_API void castor3d::NodesPass::addBackgroundDescriptor ( SceneBackground const & background,
ashes::WriteDescriptorSetArray & descriptorWrites,
crg::ImageViewIdArray const & targetImage,
uint32_t & index )
static

◆ addClusteredLightingBindings()

static C3D_API void castor3d::NodesPass::addClusteredLightingBindings ( FrustumClusters const & frustumClusters,
ashes::VkDescriptorSetLayoutBindingArray & bindings,
VkShaderStageFlags shaderStages,
uint32_t & index )
static

Adds clusters descriptor layout bindings to given list.

Parameters
[in]frustumClustersThe clusters.
[in,out]bindingsReceives the bindings.
[in]shaderStagesThe impacted shader stages.
[in,out]indexThe current binding index.

◆ addClusteredLightingDescriptor()

static C3D_API void castor3d::NodesPass::addClusteredLightingDescriptor ( FrustumClusters const & frustumClusters,
ashes::WriteDescriptorSetArray & descriptorWrites,
uint32_t & index )
static

◆ addGIBindings()

static C3D_API void castor3d::NodesPass::addGIBindings ( SceneFlags flags,
IndirectLightingData const & indirectLighting,
ashes::VkDescriptorSetLayoutBindingArray & bindings,
VkShaderStageFlags shaderStages,
uint32_t & index )
static

Adds indirect lighting descriptor layout bindings to given list.

Parameters
[in]flagsThe scene flags.
[in]indirectLightingThe indirect lighting data.
[in,out]bindingsReceives the bindings.
[in]shaderStagesThe impacted shader stages.
[in,out]indexThe current binding index.

◆ addGIDescriptor()

static C3D_API void castor3d::NodesPass::addGIDescriptor ( SceneFlags sceneFlags,
IndirectLightingData const & indirectLighting,
ashes::WriteDescriptorSetArray & descriptorWrites,
uint32_t & index )
static

◆ addShadowBindings() [1/2]

static C3D_API void castor3d::NodesPass::addShadowBindings ( ashes::VkDescriptorSetLayoutBindingArray & bindings,
VkShaderStageFlags shaderStages,
uint32_t & index )
static

Adds shadow maps descriptor layout bindings to given list.

Parameters
[in,out]bindingsReceives the bindings.
[in]shaderStagesThe impacted shader stages.
[in,out]indexThe current binding index.

◆ addShadowBindings() [2/2]

static C3D_API void castor3d::NodesPass::addShadowBindings ( SceneFlags const & sceneFlags,
ashes::VkDescriptorSetLayoutBindingArray & bindings,
VkShaderStageFlags shaderStages,
uint32_t & index )
static

Adds shadow maps descriptor layout bindings to given list.

Parameters
[in]sceneFlagsUsed to define what shadow maps need to be bound.
[in,out]bindingsReceives the bindings.
[in]shaderStagesThe impacted shader stages.
[in,out]indexThe current binding index.

◆ addShadowDescriptor() [1/2]

static C3D_API void castor3d::NodesPass::addShadowDescriptor ( RenderSystem const & renderSystem,
crg::RunnableGraph & graph,
ashes::WriteDescriptorSetArray & descriptorWrites,
ShadowMapLightTypeArray const & shadowMaps,
ShadowBuffer const & shadowBuffer,
uint32_t & index )
static

◆ addShadowDescriptor() [2/2]

static C3D_API void castor3d::NodesPass::addShadowDescriptor ( RenderSystem const & renderSystem,
crg::RunnableGraph & graph,
SceneFlags const & sceneFlags,
ashes::WriteDescriptorSetArray & descriptorWrites,
ShadowMapLightTypeArray const & shadowMaps,
ShadowBuffer const & shadowBuffer,
uint32_t & index )
static

◆ adjustFlags() [1/4]

C3D_API PassComponentCombine castor3d::NodesPass::adjustFlags ( PassComponentCombine const & passCombine) const

Adjusts given flags to match the render pass requirements.

Parameters
[in]passCombineThe flags.

◆ adjustFlags() [2/4]

C3D_API SceneFlags castor3d::NodesPass::adjustFlags ( SceneFlags flags) const

Adjusts given flags to match the render pass requirements.

Parameters
[in]flagsThe flags.

◆ adjustFlags() [3/4]

C3D_API SubmeshComponentCombine castor3d::NodesPass::adjustFlags ( SubmeshComponentCombine const & submeshCombine) const

Adjusts given flags to match the render pass requirements.

Parameters
[in]submeshCombineThe flags.

◆ adjustFlags() [4/4]

C3D_API TextureCombine castor3d::NodesPass::adjustFlags ( TextureCombine const & textureCombine) const

Filters the given textures flags using this pass needed textures.

Parameters
[in]textureCombineThe textures flags.
Returns
The filtered flags.

◆ areValidPassFlags()

C3D_API bool castor3d::NodesPass::areValidPassFlags ( PassComponentCombine const & passFlags) const
noexcept

name Getters.

Referenced by castor3d::RenderTechniqueNodesPass::areValidPassFlags().

Here is the caller graph for this function:

◆ doAdjustSceneFlags()

virtual C3D_API SceneFlags castor3d::NodesPass::doAdjustSceneFlags ( SceneFlags flags) const
protectedvirtual

◆ doAdjustSubmeshComponents()

virtual C3D_API SubmeshComponentCombine castor3d::NodesPass::doAdjustSubmeshComponents ( SubmeshComponentCombine submeshCombine) const
protectedvirtual

Reimplemented in castor3d::RenderNodesPass.

◆ doAreValidPassFlags()

virtual C3D_API bool castor3d::NodesPass::doAreValidPassFlags ( PassComponentCombine const & passFlags) const
protectedpure virtualnoexcept

Implemented in castor3d::RenderNodesPass.

◆ doIsValidNode()

virtual C3D_API bool castor3d::NodesPass::doIsValidNode ( SceneNode const & node) const
protectedpure virtualnoexcept

Implemented in castor3d::RenderNodesPass.

◆ doIsValidPass()

virtual C3D_API bool castor3d::NodesPass::doIsValidPass ( Pass const & pass) const
protectedvirtualnoexcept
Parameters
[in]passThe material pass.
Returns
true if the pass is rendered through this nodes pass.

Reimplemented in castor3d::RenderNodesPass.

◆ doIsValidRenderable()

virtual C3D_API bool castor3d::NodesPass::doIsValidRenderable ( RenderedObject const & object) const
protectedvirtualnoexcept
Parameters
[in]objectThe rendered object.
Returns
true if the object is rendered through this nodes pass.

Reimplemented in castor3d::RenderNodesPass.

◆ doUpdate()

virtual C3D_API void castor3d::NodesPass::doUpdate ( CpuUpdater & updater)
protectedpure virtual

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

Implemented in castor3d::RenderNodesPass.

◆ filtersNonStatic()

bool castor3d::NodesPass::filtersNonStatic ( ) const
inlinenoexcept

References handleStatic(), and m_handleStatic.

Here is the call graph for this function:

◆ filtersStatic()

bool castor3d::NodesPass::filtersStatic ( ) const
inlinenoexcept

References handleStatic(), and m_handleStatic.

Here is the call graph for this function:

◆ getComponentsMask()

ComponentModeFlags castor3d::NodesPass::getComponentsMask ( ) const
inlinenoexcept

References m_componentsMask.

◆ getRenderFilters()

RenderFilters castor3d::NodesPass::getRenderFilters ( ) const
inlinenoexcept

References m_filters.

◆ getTypeID()

RenderPassTypeID castor3d::NodesPass::getTypeID ( ) const
inlinenoexcept

References m_typeID.

◆ getTypeName()

castor::String const & castor3d::NodesPass::getTypeName ( ) const
inlinenoexcept

References m_typeName.

◆ handleStatic()

bool castor3d::NodesPass::handleStatic ( ) const
inlinenoexcept

References m_handleStatic.

Referenced by filtersNonStatic(), and filtersStatic().

Here is the caller graph for this function:

◆ isDirty()

bool castor3d::NodesPass::isDirty ( ) const
inlinenoexcept

References m_isDirty.

◆ isPassEnabled()

virtual C3D_API bool castor3d::NodesPass::isPassEnabled ( ) const
virtualnoexcept

◆ isValidNode()

C3D_API bool castor3d::NodesPass::isValidNode ( SceneNode const & node) const
noexcept

◆ isValidPass()

C3D_API bool castor3d::NodesPass::isValidPass ( Pass const & pass) const
noexcept

◆ isValidRenderable()

C3D_API bool castor3d::NodesPass::isValidRenderable ( RenderedObject const & object) const
noexcept

◆ update()

C3D_API void castor3d::NodesPass::update ( CpuUpdater & updater)

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

Member Data Documentation

◆ m_cameraUbo

CameraUbo const& castor3d::NodesPass::m_cameraUbo
protected

◆ m_category

castor::String castor3d::NodesPass::m_category
protected

◆ m_componentsMask

ComponentModeFlags castor3d::NodesPass::m_componentsMask {}
protected

Referenced by getComponentsMask().

◆ m_device

RenderDevice const& castor3d::NodesPass::m_device
protected

◆ m_filters

RenderFilters castor3d::NodesPass::m_filters { RenderFilter::eNone }
protected

Referenced by getRenderFilters().

◆ m_handleStatic

std::optional< bool > castor3d::NodesPass::m_handleStatic { std::nullopt }
protected

◆ m_index

uint32_t castor3d::NodesPass::m_index { 0u }
protected

◆ m_isDirty

bool castor3d::NodesPass::m_isDirty { true }
protected

Referenced by isDirty().

◆ m_renderSystem

RenderSystem& castor3d::NodesPass::m_renderSystem
protected

◆ m_safeBand

bool castor3d::NodesPass::m_safeBand { false }
protected

◆ m_sceneUbo

SceneUbo const* castor3d::NodesPass::m_sceneUbo {}
protected

◆ m_size

castor::Size castor3d::NodesPass::m_size
protected

◆ m_targetDepth

crg::ImageViewIdArray castor3d::NodesPass::m_targetDepth
protected

◆ m_targetImage

crg::ImageViewIdArray castor3d::NodesPass::m_targetImage
protected

◆ m_typeID

RenderPassTypeID castor3d::NodesPass::m_typeID {}
protected

Referenced by getTypeID().

◆ m_typeName

castor::String castor3d::NodesPass::m_typeName
protected

Referenced by getTypeName().

◆ onSortNodes

NodesPassChangeSignal castor3d::NodesPass::onSortNodes
mutable

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