![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Pass.hpp>


Public Member Functions | |
| C3D_API void | initialise (RenderDevice const &device, QueueData const &queueData) |
| Initialises the pass and all it's dependencies. More... | |
| C3D_API void | cleanup () |
| Cleans up the pass and all it's dependencies. More... | |
| C3D_API void | update () |
| Updates the render pass, CPU wise. More... | |
| C3D_API void | registerTexture (TextureSourceInfo sourceInfo, PassTextureConfig configuration) |
| Adds a texture. More... | |
| C3D_API void | registerTexture (TextureSourceInfo sourceInfo, PassTextureConfig configuration, AnimationUPtr animation) |
| Adds an animated texture. More... | |
| C3D_API void | unregisterTexture (TextureSourceInfo sourceInfo) |
| Removes a texture unit. More... | |
| C3D_API void | resetTexture (TextureSourceInfo const &srcSourceInfo, TextureSourceInfo dstSourceInfo) |
| Replaces a texture source. More... | |
| C3D_API void | updateConfig (TextureSourceInfo const &sourceInfo, TextureConfiguration configuration) |
| Updates the configuration for a texture. More... | |
| C3D_API TextureUnitSPtr | getTextureUnit (uint32_t index) const |
| Retrieves the TextureUnit at the given index. More... | |
| C3D_API void | prepareTextures () |
| Reduces the textures. More... | |
| virtual C3D_API void | setColour (castor::RgbColour const &value)=0 |
| Sets the basic pass colour. More... | |
| virtual C3D_API castor::RgbColour const & | getColour () const =0 |
| C3D_API void | setOpacity (float value) |
| Sets the global alpha value. More... | |
| C3D_API PassFlags | getPassFlags () const |
| C3D_API void | setSubsurfaceScattering (SubsurfaceScatteringUPtr value) |
| Sets the subsurface scattering extended informations. More... | |
| virtual C3D_API void | accept (PassVisitorBase &vis) |
| PassVisitor acceptance function. More... | |
| virtual C3D_API void | fillBuffer (PassBuffer &buffer) const =0 |
| Fills the pass buffer with this pass data. More... | |
| C3D_API void | fillSssProfileBuffer (SssProfileBuffer &buffer) const |
| Fills the pass buffer with this pass data. More... | |
| virtual C3D_API void | fillConfig (TextureConfiguration &config, PassVisitorBase &vis) |
| PassVisitor acceptance function, for a specific texture configuration. More... | |
| virtual C3D_API uint32_t | getPassSectionID () const =0 |
| virtual C3D_API uint32_t | getTextureSectionID () const =0 |
| virtual C3D_API bool | writeText (castor::String const &tabs, castor::Path const &folder, castor::String const &subfolder, castor::StringStream &file) const =0 |
| C3D_API bool | needsAlphaProcessing () const |
| C3D_API bool | hasAlphaBlending () const |
| C3D_API bool | hasOnlyAlphaBlending () const |
| C3D_API bool | hasAlphaTest () const |
| C3D_API bool | hasBlendAlphaTest () const |
| C3D_API TextureUnitPtrArray | getTextureUnits (TextureFlags mask=TextureFlag::eAll) const |
| C3D_API uint32_t | getTextureUnitsCount (TextureFlags mask=TextureFlag::eAll) const |
| C3D_API TextureFlagsArray | getTexturesMask (TextureFlags mask=TextureFlag::eAll) const |
| TextureSourceMap & | getSources () |
| TextureFlags const & | getTextures () const |
| bool | hasAutomaticShader () const |
| bool | isTwoSided () const |
| bool | hasEnvironmentMapping () const |
| float | getOpacity () const |
| uint32_t | getBWAccumulationOperator () const |
| float | getEmissive () const |
| float | getRefractionRatio () const |
| BlendMode | getAlphaBlendMode () const |
| BlendMode | getColourBlendMode () const |
| uint32_t | getId () const |
| uint32_t | getSssProfileId () const |
| VkCompareOp | getAlphaFunc () const |
| float | getAlphaValue () const |
| VkCompareOp | getBlendAlphaFunc () const |
| castor::Point3f | getTransmission () const |
| bool | hasSubsurfaceScattering () const |
| ParallaxOcclusionMode | getParallaxOcclusion () const |
| bool | hasParallaxOcclusion () const |
| SubsurfaceScattering const & | getSubsurfaceScattering () const |
| bool | isImplicit () const |
| bool | hasReflections () const |
| bool | hasRefraction () const |
| bool | hasEdges () const |
| uint32_t | getHeightTextureIndex () const |
| bool | hasLighting () const |
| bool | hasIBL () const |
| PassTypeID | getTypeID () const |
| float | getEdgeWidth () const |
| float | getDepthFactor () const |
| float | getNormalFactor () const |
| float | getObjectFactor () const |
| castor::RgbaColour | getEdgeColour () const |
| RenderPassRegisterInfo * | getRenderPassInfo () const |
| uint32_t | getIndex () const |
| auto | begin () const |
| auto | begin () |
| auto | end () const |
| auto | end () |
| void | setTwoSided (bool value) |
| void | setEmissive (float const &value) |
| void | setRefractionRatio (float value) |
| void | setTransmission (castor::Point3f value) |
| void | setParallaxOcclusion (ParallaxOcclusionMode value) |
| void | setAlphaBlendMode (BlendMode value) |
| void | setColourBlendMode (BlendMode value) |
| void | setId (uint32_t value) |
| void | setSssProfileId (uint32_t value) |
| void | setAlphaFunc (VkCompareOp value) |
| void | setAlphaValue (float value) |
| void | setBlendAlphaFunc (VkCompareOp value) |
| void | setBWAccumulationOperator (uint32_t value) |
| void | enableReflections (bool value=true) |
| void | enableRefractions (bool value=true) |
| void | setImplicit (bool value=true) |
| void | enableLighting (bool value) |
| void | enablePicking (bool value) |
| void | enableEdges (bool value) |
| void | setEdgeWidth (float value) |
| void | setDepthFactor (float value) |
| void | setNormalFactor (float value) |
| void | setObjectFactor (float value) |
| void | setEdgeColour (castor::RgbaColour const &value) |
Static Public Member Functions | |
| static C3D_API void | addParser (castor::AttributeParsers &parsers, uint32_t section, castor::String const &name, castor::ParserFunction function, castor::ParserParameterArray &&array=castor::ParserParameterArray{}) |
Public Attributes | |
| OnPassChanged | onChanged |
| OnPassChanged | onSssProfileChanged |
Static Public Attributes | |
| static float constexpr | MinEdgeWidth = 0.001f |
| static float constexpr | MaxEdgeWidth = 1000.0f |
Protected Member Functions | |
| C3D_API | Pass (Material &parent, PassTypeID typeID, PassFlags initialFlags) |
| Constructor. More... | |
| virtual C3D_API | ~Pass () |
| Destructor. More... | |
| C3D_API void | doMergeImages (TextureFlag lhsFlag, uint32_t lhsMaskOffset, uint32_t lhsDstMask, TextureFlag rhsFlag, uint32_t rhsMaskOffset, uint32_t rhsDstMask, castor::String const &name, TextureUnitPtrArray &result) |
| C3D_API void | doJoinDifOpa (TextureUnitPtrArray &result, castor::String const &name) |
| C3D_API void | doFillData (PassBuffer::PassDataPtr &data) const |
| virtual C3D_API void | doAccept (TextureConfiguration &config, PassVisitorBase &vis)=0 |
| virtual C3D_API void | doAccept (PassVisitorBase &vis)=0 |
Static Protected Member Functions | |
| static C3D_API void | parseError (castor::String const &error) |
| static C3D_API void | addCommonParsers (uint32_t mtlSectionID, uint32_t texSectionID, uint32_t remapChannelSectionID, castor::AttributeParsers &result) |
Protected Attributes | |
| bool | m_dirty { true } |
| bool | m_sssDirty { true } |
|
explicitprotected |
Constructor.
| [in] | parent | The parent material. |
| [in] | typeID | The pass type ID. |
| [in] | initialFlags | The flags inherited from pass type. |
|
protectedvirtual |
Destructor.
|
virtual |
PassVisitor acceptance function.
| vis | The ... visitor. |
|
staticprotected |
|
static |
|
inline |
|
inline |
name Textures iteration.
| C3D_API void castor3d::Pass::cleanup | ( | ) |
Cleans up the pass and all it's dependencies.
|
protectedpure virtual |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, and castor3d::PhongPass.
|
protectedpure virtual |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, and castor3d::PhongPass.
|
protected |
|
protected |
|
protected |
|
inline |
References castor3d::eDrawEdge.
|
inline |
References castor3d::eLighting.
|
inline |
References castor3d::ePickable.
|
inline |
References castor3d::eReflection.
|
inline |
References castor3d::eRefraction.
|
inline |
|
inline |
|
pure virtual |
Fills the pass buffer with this pass data.
| [in,out] | buffer | The pass buffer. |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, and castor3d::PhongPass.
|
virtual |
PassVisitor acceptance function, for a specific texture configuration.
| config | The texture configuration. |
| vis | The ... visitor. |
| C3D_API void castor3d::Pass::fillSssProfileBuffer | ( | SssProfileBuffer & | buffer | ) | const |
Fills the pass buffer with this pass data.
| [in,out] | buffer | The pass buffer. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, and castor3d::PhongPass.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, castor3d::BlinnPhongPass, and castor3d::PhongPass.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, castor3d::BlinnPhongPass, and castor3d::PhongPass.
| C3D_API TextureFlagsArray castor3d::Pass::getTexturesMask | ( | TextureFlags | mask = TextureFlag::eAll | ) | const |
| C3D_API TextureUnitSPtr castor3d::Pass::getTextureUnit | ( | uint32_t | index | ) | const |
Retrieves the TextureUnit at the given index.
| [in] | index | The index of the TextureUnit to retrieve. |
nullptr if index was out of bounds. | C3D_API TextureUnitPtrArray castor3d::Pass::getTextureUnits | ( | TextureFlags | mask = TextureFlag::eAll | ) | const |
| C3D_API uint32_t castor3d::Pass::getTextureUnitsCount | ( | TextureFlags | mask = TextureFlag::eAll | ) | const |
|
inline |
|
inline |
| C3D_API bool castor3d::Pass::hasAlphaBlending | ( | ) | const |
| C3D_API bool castor3d::Pass::hasAlphaTest | ( | ) | const |
|
inline |
| C3D_API bool castor3d::Pass::hasBlendAlphaTest | ( | ) | const |
|
inline |
References castor3d::eDrawEdge.
|
inline |
References castor3d::eReflection, and castor3d::eRefraction.
|
inline |
References castor3d::eImageBasedLighting.
|
inline |
References castor3d::eLighting.
| C3D_API bool castor3d::Pass::hasOnlyAlphaBlending | ( | ) | const |
|
inline |
References castor3d::eNone.
|
inline |
References castor3d::eReflection.
|
inline |
References castor3d::eRefraction.
|
inline |
References castor3d::eSubsurfaceScattering.
| C3D_API void castor3d::Pass::initialise | ( | RenderDevice const & | device, |
| QueueData const & | queueData | ||
| ) |
Initialises the pass and all it's dependencies.
| [in] | device | The GPU device. |
| [in] | queueData | Receives the GPU commands. |
|
inline |
|
inline |
| C3D_API bool castor3d::Pass::needsAlphaProcessing | ( | ) | const |
name Getters.
|
staticprotected |
| C3D_API void castor3d::Pass::prepareTextures | ( | ) |
Reduces the textures.
| C3D_API void castor3d::Pass::registerTexture | ( | TextureSourceInfo | sourceInfo, |
| PassTextureConfig | configuration | ||
| ) |
Adds a texture.
| [in] | sourceInfo | The texture source. |
| [in] | configuration | The texture configuration. |
| C3D_API void castor3d::Pass::registerTexture | ( | TextureSourceInfo | sourceInfo, |
| PassTextureConfig | configuration, | ||
| AnimationUPtr | animation | ||
| ) |
Adds an animated texture.
| [in] | sourceInfo | The texture source. |
| [in] | configuration | The texture configuration. |
| [in] | animation | The texture animation. |
| C3D_API void castor3d::Pass::resetTexture | ( | TextureSourceInfo const & | srcSourceInfo, |
| TextureSourceInfo | dstSourceInfo | ||
| ) |
Replaces a texture source.
| [in] | srcSourceInfo | The original texture source. |
| [in] | dstSourceInfo | The replacement texture source. |
|
inline |
References castor3d::eAlphaBlending, and hasAlphaBlending().

|
inline |
|
inline |
|
inline |
References castor3d::eBlendAlphaTest, and hasBlendAlphaTest().

|
inline |
|
pure virtual |
Sets the basic pass colour.
| [in] | value | The new value. |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, and castor3d::PhongPass.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| C3D_API void castor3d::Pass::setOpacity | ( | float | value | ) |
Sets the global alpha value.
| [in] | value | The new value. |
|
inline |
|
inline |
|
inline |
| C3D_API void castor3d::Pass::setSubsurfaceScattering | ( | SubsurfaceScatteringUPtr | value | ) |
Sets the subsurface scattering extended informations.
| [in] | value | The new value. |
|
inline |
|
inline |
name Mutators.
| C3D_API void castor3d::Pass::unregisterTexture | ( | TextureSourceInfo | sourceInfo | ) |
Removes a texture unit.
| [in] | sourceInfo | The texture source. |
| C3D_API void castor3d::Pass::update | ( | ) |
Updates the render pass, CPU wise.
| C3D_API void castor3d::Pass::updateConfig | ( | TextureSourceInfo const & | sourceInfo, |
| TextureConfiguration | configuration | ||
| ) |
Updates the configuration for a texture.
| [in] | sourceInfo | The texture source. |
| [in] | configuration | The new texture configuration. |
|
pure virtual |
Implemented in castor3d::MetallicRoughnessPbrPass, castor3d::SpecularGlossinessPbrPass, and castor3d::PhongPass.
|
protected |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
| OnPassChanged castor3d::Pass::onChanged |
| OnPassChanged castor3d::Pass::onSssProfileChanged |