![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <RenderNodesPass.hpp>
Classes | |
struct | PassDescriptors |
Public Member Functions | |
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 RenderPipeline & | prepareBackPipeline (PipelineFlags pipelineFlags, ashes::PipelineVertexInputStateCreateInfoCRefArray const &vertexLayouts) |
Prepares the pipeline matching the given flags, for back face culling nodes. More... | |
C3D_API RenderPipeline & | prepareFrontPipeline (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 Scene & | getScene () const |
C3D_API SceneNode const * | getIgnoredNode () const |
virtual C3D_API ShaderFlags | getShaderFlags () const |
bool | isOrderIndependent () const |
SceneCuller const & | getCuller () const |
SceneCuller & | getCuller () |
SceneUbo & | getSceneUbo () |
SceneUbo const & | getSceneUbo () const |
MatrixUbo & | getMatrixUbo () const |
uint32_t | getPipelinesCount () const |
bool | isDirty () const |
bool | forceTwoSided () const |
RenderMode | getRenderMode () const |
castor::String const & | getTypeName () const |
RenderPassTypeID | getTypeID () const |
Static Public Member Functions | |
static C3D_API ashes::PipelineColorBlendStateCreateInfo | createBlendState (BlendMode colourBlendMode, BlendMode alphaBlendMode, uint32_t attachesCount) |
Creates a blend state matching given blend modes. More... | |
Protected Member Functions | |
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 | |
RenderDevice const & | m_device |
RenderSystem & | m_renderSystem |
MatrixUbo & | m_matrixUbo |
SceneCuller & | m_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 |
|
protected |
Constructor.
[in] | pass | The parent frame pass. |
[in] | context | The rendering context. |
[in] | graph | The runnable graph. |
[in] | device | The GPU device. |
[in] | typeName | The pass type name. |
[in] | category | The pass category. |
[in] | name | The pass name. |
[in] | desc | The construction data. |
|
override |
Destructor.
Adjusts given flags to match the render pass requirements.
[in] | flags | The flags. |
C3D_API ProgramFlags castor3d::RenderNodesPass::adjustFlags | ( | ProgramFlags | flags | ) | const |
Adjusts given flags to match the render pass requirements.
[in] | flags | The flags. |
C3D_API SceneFlags castor3d::RenderNodesPass::adjustFlags | ( | SceneFlags | flags | ) | const |
Adjusts given flags to match the render pass requirements.
[in] | flags | The flags. |
|
static |
Creates a blend state matching given blend modes.
[in] | colourBlendMode | The colour blend mode. |
[in] | alphaBlendMode | The alpha blend mode. |
[in] | attachesCount | The wanted blend attaches count. |
C3D_API PipelineFlags castor3d::RenderNodesPass::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.
[in] | colourBlendMode | The colour blending mode. |
[in] | alphaBlendMode | The alpha blending mode. |
[in] | passFlags | The pass flags. |
[in] | renderPassTypeID | The render pass type ID. |
[in] | passTypeID | The material pass type ID. |
[in] | heightTextureIndex | The height map index (if any). |
[in] | alphaFunc | The alpha comparison function (for opaque nodes). |
[in] | blendAlphaFunc | The alpha comparison function (for transparent nodes). |
[in] | textures | The textures configuration. |
[in] | programFlags | A combination of ProgramFlag. |
[in] | sceneFlags | Scene related flags. |
[in] | topology | The render topology. |
[in] | isFrontCulled | true for front face culling, false for back face culling. |
C3D_API PipelineFlags castor3d::RenderNodesPass::createPipelineFlags | ( | Pass const & | pass, |
TextureFlagsArray const & | textures, | ||
ProgramFlags const & | programFlags, | ||
SceneFlags const & | sceneFlags, | ||
VkPrimitiveTopology | topology, | ||
bool | isFrontCulled | ||
) |
Creates the pipeline flags for given configuration.
[in] | pass | The pass for whic the pipeline is created. |
[in] | textures | The textures configuration. |
[in] | programFlags | A combination of ProgramFlag. |
[in] | sceneFlags | Scene related flags. |
[in] | topology | The render topology. |
[in] | isFrontCulled | true for front face culling, false for back face culling. |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in castor3d::RenderTechniquePass.
|
protectedvirtual |
Reimplemented in castor3d::RenderTechniquePass.
|
protectedvirtual |
|
protectedpure virtual |
Fills the render pass specific descriptor layout bindings.
[in,out] | bindings | Receives the additional bindings. |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Updates billboards.
[in] | nodes | The render nodes. |
|
protected |
Updates billboards.
[in] | nodes | The render nodes. |
[in,out] | info | Receives the render informations. |
|
protectedvirtual |
Updates the specific data.
[out] | queues | Receives the render queues needed for the rendering of the frame. |
|
protected |
Updates non instantiated submeshes.
[in] | nodes | The render nodes. |
|
protected |
Updates non instantiated submeshes.
[in] | nodes | The render nodes. |
[in,out] | info | Receives the render informations. |
|
protected |
Updates instantiated submeshes.
[in] | nodes | The render nodes. |
|
protected |
Updates instantiated submeshes.
[in] | nodes | The render nodes. |
[in,out] | info | Receives the render informations. |
|
protectedvirtual |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
Reimplemented in castor3d::RenderTechniquePass.
C3D_API FilteredTextureFlags castor3d::RenderNodesPass::filterTexturesFlags | ( | TextureFlagsArray const & | textures | ) | const |
Filters the given textures flags using this pass needed textures.
[in] | textures | The textures flags. |
|
inline |
References m_forceTwoSided.
|
inline |
References m_culler.
|
inline |
References m_culler.
C3D_API ShaderPtr castor3d::RenderNodesPass::getDomainShaderSource | ( | PipelineFlags const & | flags | ) | const |
Retrieves the domain shader source matching the given flags.
[in] | flags | The pipeline flags. |
C3D_API ShaderPtr castor3d::RenderNodesPass::getGeometryShaderSource | ( | PipelineFlags const & | flags | ) | const |
Retrieves the geometry shader source matching the given flags.
[in] | flags | The pipeline flags. |
C3D_API ShaderPtr castor3d::RenderNodesPass::getHullShaderSource | ( | PipelineFlags const & | flags | ) | const |
Retrieves the hull shader source matching the given flags.
[in] | flags | The pipeline flags. |
|
inline |
References m_matrixUbo.
|
inline |
C3D_API ShaderPtr castor3d::RenderNodesPass::getPixelShaderSource | ( | PipelineFlags const & | flags | ) | const |
Retrieves the pixel shader source matching the given flags.
[in] | flags | The pipeline flags. |
|
inline |
References m_mode.
|
inline |
References m_sceneUbo.
|
inline |
References m_sceneUbo.
|
inlinevirtual |
Reimplemented in castor3d::VoxelizePass, castor3d::DepthPass, castor3d::PickingPass, castor3d::ShadowMapPass, castor3d::OpaquePass, and castor3d::RenderTechniquePass.
References castor3d::eTangentSpace, and castor3d::eWorldSpace.
|
virtual |
name Getters.
Reimplemented in castor3d::DepthPass, castor3d::PickingPass, castor3d::ShadowMapPass, castor3d::OpaquePass, and castor3d::TransparentPass.
|
inline |
References m_typeID.
|
inline |
References m_typeName.
C3D_API ShaderPtr castor3d::RenderNodesPass::getVertexShaderSource | ( | PipelineFlags const & | flags | ) | const |
Retrieves the vertex shader source matching the given flags.
[in] | flags | The pipeline flags. |
C3D_API bool castor3d::RenderNodesPass::hasNodes | ( | ) | const |
C3D_API void castor3d::RenderNodesPass::initialiseAdditionalDescriptor | ( | RenderPipeline & | pipeline, |
ShadowMapLightTypeArray const & | shadowMaps | ||
) |
Initialises the additional descriptor set of a billboard node.
[in] | pipeline | The render pipeline. |
[in] | shadowMaps | The shadow maps. |
|
inline |
References m_isDirty.
|
inline |
References m_oit.
C3D_API bool castor3d::RenderNodesPass::isPassEnabled | ( | ) | const |
C3D_API bool castor3d::RenderNodesPass::isValidRenderable | ( | RenderedObject const & | object | ) | const |
C3D_API RenderPipeline & castor3d::RenderNodesPass::prepareBackPipeline | ( | PipelineFlags | pipelineFlags, |
ashes::PipelineVertexInputStateCreateInfoCRefArray const & | vertexLayouts | ||
) |
Prepares the pipeline matching the given flags, for back face culling nodes.
[in] | pipelineFlags | The pipeline flags. |
[in] | vertexLayouts | The vertex buffers layouts. |
C3D_API RenderPipeline & castor3d::RenderNodesPass::prepareFrontPipeline | ( | PipelineFlags | pipelineFlags, |
ashes::PipelineVertexInputStateCreateInfoCRefArray const & | vertexLayouts | ||
) |
Prepares the pipeline matching the given flags, for front face culling nodes.
[in] | pipelineFlags | The pipeline flags. |
[in] | vertexLayouts | The vertex buffers layouts. |
Sets the node ignored node.
[in] | node | The node. |
|
virtual |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
Reimplemented in castor3d::RenderTechniquePass, castor3d::VoxelizePass, castor3d::ShadowMapPassDirectional, castor3d::ShadowMapPassPoint, and castor3d::ShadowMapPassSpot.
|
virtual |
Updates the render pass, GPU wise.
[in,out] | updater | The update data. |
Reimplemented in castor3d::RenderTechniquePass, castor3d::VoxelizePass, castor3d::ShadowMapPassDirectional, castor3d::ShadowMapPassPoint, castor3d::ShadowMapPassSpot, and castor3d::RenderTechniquePass.
|
protected |
|
protected |
|
protected |
Referenced by getCuller().
|
protected |
|
protected |
Referenced by forceTwoSided().
|
protected |
|
protected |
Referenced by isDirty().
|
protected |
Referenced by getMatrixUbo().
|
protected |
Referenced by getRenderMode().
|
protected |
Referenced by isOrderIndependent().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getSceneUbo().
|
protected |
|
protected |
Referenced by getTypeID().
|
protected |
Referenced by getTypeName().