Castor3D 0.16.0
Multiplatform 3D engine
|
#include <PassComponent.hpp>
Public Member Functions | |
C3D_API | PassComponentsShader (PassComponentPlugin const &plugin) |
virtual C3D_API void | fillComponents (ComponentModeFlags componentsMask, sdw::type::BaseStruct &components, Materials const &materials, sdw::StructInstance const *surface) const |
Fills the components shader struct with the members provided by this component. | |
virtual C3D_API void | fillComponentsInits (sdw::type::BaseStruct const &components, Materials const &materials, Material const *material, sdw::StructInstance const *surface, sdw::Vec4 const *clrCot, sdw::expr::ExprList &inits) const |
Fills the components shader struct members initialiser with the ones provided by this component. | |
virtual C3D_API void | applyComponents (PipelineFlags const *flags, shader::TextureConfigData const &config, sdw::U32Vec3 const &imgCompConfig, sdw::Vec4 const &sampled, sdw::Vec2 const &uv, BlendComponents &components) const |
Fills this component's values with the data retrieved from a texture. | |
virtual C3D_API void | blendComponents (shader::Materials const &materials, sdw::Float const &passMultiplier, BlendComponents &res, BlendComponents const &src) const |
Used to mix components when multiple passes are blended together. | |
virtual C3D_API void | updateComponent (sdw::Array< sdw::CombinedImage2DRgba32 > const &maps, shader::Material const &material, shader::BlendComponents &components, bool isFrontCulled) const |
virtual C3D_API sdw::Vec4 | sampleMap (sdw::CombinedImage2DRgba32 const &map, sdw::Vec3 const &texCoords, shader::BlendComponents const &components) const |
virtual C3D_API sdw::Vec4 | sampleMap (sdw::CombinedImage2DRgba32 const &map, shader::DerivTex const &texCoords, shader::BlendComponents const &components) const |
virtual C3D_API bool | isMapSampling (PipelineFlags const &flags) const |
Getters. | |
C3D_API PassComponentID | getId () const |
PassComponentPlugin const & | getPlugin () const |
Public Member Functions inherited from castor3d::shader::PassShader | |
PassShader ()=default | |
PassShader (PassShader const &)=delete | |
PassShader & | operator= (PassShader const &)=delete |
C3D_API | PassShader (PassShader &&)=default |
C3D_API PassShader & | operator= (PassShader &&)=default |
virtual C3D_API | ~PassShader ()=default |
Protected Member Functions | |
C3D_API void | applyFloatComponent (castor::String const &mapName, castor::String const &valueName, PassShaders const &passShaders, TextureConfigurations const &textureConfigs, TextureAnimations const &textureAnims, Material const &material, BlendComponents &components, SampleTexture const &sampleTexture) const |
C3D_API void | applyVec3Component (castor::String const &mapName, castor::String const &valueName, PassShaders const &passShaders, TextureConfigurations const &textureConfigs, TextureAnimations const &textureAnims, Material const &material, BlendComponents &components, SampleTexture const &sampleTexture) const |
void | applyFloatComponent (castor::String const &valueName, PassShaders const &passShaders, TextureConfigurations const &textureConfigs, TextureAnimations const &textureAnims, Material const &material, BlendComponents &components, SampleTexture const &sampleTexture) const |
void | applyVec3Component (castor::String const &valueName, PassShaders const &passShaders, TextureConfigurations const &textureConfigs, TextureAnimations const &textureAnims, Material const &material, BlendComponents &components, SampleTexture const &sampleTexture) const |
|
inlineexplicit |
|
inlinevirtual |
Fills this component's values with the data retrieved from a texture.
[in] | flags | Used to check if the render pass is configured so the component is usable. |
[in] | config | Used to say if the texture has the needed configuration for this component. |
[in] | imgCompConfig | The current image component(s) to use. |
[in] | sampled | The data retrieved from the texture. |
[in] | uv | The texture coordinates used to retrieve sampled . |
[in] | components | Contains the component members. |
|
protected |
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlinevirtual |
Used to mix components when multiple passes are blended together.
[in] | materials | Used to check if the current render pass needs this component. |
[in] | passMultiplier | The factor for the current pass. |
[in,out] | res | Receives the blending result. |
[in] | src | The current pass data. |
Reimplemented in castor3d::NormalComponent::ComponentsShader, castor3d::TexturesComponent::ComponentsShader, castor3d::AmbientComponent::ComponentsShader, castor3d::AttenuationComponent::ComponentsShader, castor3d::ClearcoatComponent::ComponentsShader, castor3d::EmissiveComponent::ComponentsShader, castor3d::IridescenceComponent::ComponentsShader, castor3d::MetalnessComponent::ComponentsShader, castor3d::RoughnessComponent::ComponentsShader, castor3d::SheenComponent::ComponentsShader, castor3d::SpecularComponent::ComponentsShader, castor3d::SpecularFactorComponent::ComponentsShader, castor3d::SubsurfaceScatteringComponent::ComponentsShader, castor3d::ThicknessComponent::ComponentsShader, castor3d::TransmissionComponent::ComponentsShader, castor3d::TransmittanceComponent::ComponentsShader, castor3d::OcclusionMapComponent::ComponentsShader, castor3d::AlphaTestComponent::ComponentsShader, castor3d::ColourComponent::ComponentsShader, castor3d::HeightComponent::ComponentsShader, castor3d::OpacityComponent::ComponentsShader, castor3d::ReflectionComponent::ComponentsShader, and castor3d::RefractionComponent::ComponentsShader.
|
inlinevirtual |
Fills the components shader struct with the members provided by this component.
[in] | componentsMask | Used to check if the component is valid in the context of the call. |
[in,out] | components | Receives the struct members. |
[in] | materials | Used to check if the current render pass needs this component. |
[in] | surface | Used to check if the surface supports needed data for this component. |
Reimplemented in castor3d::FractalMappingComponent::ComponentsShader, castor3d::NormalComponent::ComponentsShader, castor3d::TexturesComponent::ComponentsShader, castor3d::AmbientComponent::ComponentsShader, castor3d::AttenuationComponent::ComponentsShader, castor3d::ClearcoatComponent::ComponentsShader, castor3d::EmissiveComponent::ComponentsShader, castor3d::IridescenceComponent::ComponentsShader, castor3d::MetalnessComponent::ComponentsShader, castor3d::RoughnessComponent::ComponentsShader, castor3d::SheenComponent::ComponentsShader, castor3d::SpecularComponent::ComponentsShader, castor3d::SpecularFactorComponent::ComponentsShader, castor3d::SubsurfaceScatteringComponent::ComponentsShader, castor3d::ThicknessComponent::ComponentsShader, castor3d::TransmissionComponent::ComponentsShader, castor3d::TransmittanceComponent::ComponentsShader, castor3d::OcclusionMapComponent::ComponentsShader, castor3d::AlphaTestComponent::ComponentsShader, castor3d::ColourComponent::ComponentsShader, castor3d::HeightComponent::ComponentsShader, castor3d::OpacityComponent::ComponentsShader, castor3d::ReflectionComponent::ComponentsShader, and castor3d::RefractionComponent::ComponentsShader.
|
inlinevirtual |
Fills the components shader struct members initialiser with the ones provided by this component.
[in] | components | Receives the struct members. |
[in] | materials | Used to check if the current render pass needs this component. |
[in] | material | Used to retrieve needed data for this component. |
[in] | surface | Used to retrieve needed data for this component. |
[in] | clrCot | Used to retrieve needed data for this component. |
[in,out] | inits | Receives the initialisers. |
Reimplemented in castor3d::FractalMappingComponent::ComponentsShader, castor3d::NormalComponent::ComponentsShader, castor3d::TexturesComponent::ComponentsShader, castor3d::AmbientComponent::ComponentsShader, castor3d::AttenuationComponent::ComponentsShader, castor3d::ClearcoatComponent::ComponentsShader, castor3d::EmissiveComponent::ComponentsShader, castor3d::IridescenceComponent::ComponentsShader, castor3d::MetalnessComponent::ComponentsShader, castor3d::RoughnessComponent::ComponentsShader, castor3d::SheenComponent::ComponentsShader, castor3d::SpecularComponent::ComponentsShader, castor3d::SpecularFactorComponent::ComponentsShader, castor3d::SubsurfaceScatteringComponent::ComponentsShader, castor3d::ThicknessComponent::ComponentsShader, castor3d::TransmissionComponent::ComponentsShader, castor3d::TransmittanceComponent::ComponentsShader, castor3d::OcclusionMapComponent::ComponentsShader, castor3d::AlphaTestComponent::ComponentsShader, castor3d::ColourComponent::ComponentsShader, castor3d::HeightComponent::ComponentsShader, castor3d::OpacityComponent::ComponentsShader, castor3d::ReflectionComponent::ComponentsShader, and castor3d::RefractionComponent::ComponentsShader.
C3D_API PassComponentID castor3d::shader::PassComponentsShader::getId | ( | ) | const |
Referenced by castor3d::AttenuationMapComponent::ComponentsShader::getTextureFlags(), castor3d::ClearcoatMapComponent::ComponentsShader::getTextureFlags(), castor3d::ClearcoatNormalMapComponent::ComponentsShader::getTextureFlags(), castor3d::ClearcoatRoughnessMapComponent::ComponentsShader::getTextureFlags(), castor3d::ColourMapComponent::ComponentsShader::getTextureFlags(), castor3d::EmissiveMapComponent::ComponentsShader::getTextureFlags(), castor3d::GlossinessMapComponent::ComponentsShader::getTextureFlags(), castor3d::HeightMapComponent::ComponentsShader::getTextureFlags(), castor3d::IridescenceMapComponent::ComponentsShader::getTextureFlags(), castor3d::IridescenceThicknessMapComponent::ComponentsShader::getTextureFlags(), castor3d::MetalnessMapComponent::ComponentsShader::getTextureFlags(), castor3d::NormalMapComponent::ComponentsShader::getTextureFlags(), castor3d::OcclusionMapComponent::ComponentsShader::getTextureFlags(), castor3d::OpacityMapComponent::ComponentsShader::getTextureFlags(), castor3d::RoughnessMapComponent::ComponentsShader::getTextureFlags(), castor3d::SheenMapComponent::ComponentsShader::getTextureFlags(), castor3d::SheenRoughnessMapComponent::ComponentsShader::getTextureFlags(), castor3d::SpecularFactorMapComponent::ComponentsShader::getTextureFlags(), castor3d::SpecularMapComponent::ComponentsShader::getTextureFlags(), castor3d::TransmissionMapComponent::ComponentsShader::getTextureFlags(), castor3d::TransmittanceMapComponent::ComponentsShader::getTextureFlags(), castor3d::FractalMappingComponent::ComponentsShader::isMapSampling(), and castor3d::UntileMappingComponent::ComponentsShader::isMapSampling().
|
inline |
|
inlinevirtual |
true
if the component map sampling is usable with given flags
. Reimplemented in castor3d::FractalMappingComponent::ComponentsShader, and castor3d::UntileMappingComponent::ComponentsShader.
|
virtual |
Lets the component sample the map.
[in] | map | The texture. |
[in] | texCoords | The texture coordinates. |
[in] | components | Contains the component members. |
Reimplemented in castor3d::FractalMappingComponent::ComponentsShader, and castor3d::UntileMappingComponent::ComponentsShader.
|
virtual |
Lets the component sample the map.
[in] | map | The texture. |
[in] | texCoords | The texture coordinates. |
[in] | components | Contains the component members. |
Reimplemented in castor3d::FractalMappingComponent::ComponentsShader, and castor3d::UntileMappingComponent::ComponentsShader.
|
inlinevirtual |
Adjusts the component data after textures have been parsed.
[in] | maps | Holds the material pass images. |
[in] | material | The material data. |
[in,out] | components | Contains the component members. |
[in] | isFrontCulled | Tells if this shader is for front culled objects. |
Reimplemented in castor3d::MetalnessComponent::ComponentsShader.