Castor3D 0.13.0
Multiplatform 3D engine
Fonctions membres publiques | Fonctions membres publiques statiques | Liste de tous les membres
Référence de la classe castor3d::shader::PbrLightingModel

#include <GlslPbrLighting.hpp>

Graphe d'héritage de castor3d::shader::PbrLightingModel:
Inheritance graph
[légende]
Graphe de collaboration de castor3d::shader::PbrLightingModel:
Collaboration graph
[légende]

Fonctions membres publiques

C3D_API PbrLightingModel (sdw::ShaderWriter &writer, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric)
 
C3D_API std::unique_ptr< LightMaterialdeclMaterial (std::string const &name, bool enabled) override
 
C3D_API sdw::Vec3 combine (sdw::Vec3 const &directDiffuse, sdw::Vec3 const &indirectDiffuse, sdw::Vec3 const &directSpecular, sdw::Vec3 const &indirectSpecular, sdw::Vec3 const &ambient, sdw::Vec3 const &indirectAmbient, sdw::Float const &ambientOcclusion, sdw::Vec3 const &emissive, sdw::Vec3 const &reflected, sdw::Vec3 const &refracted, sdw::Vec3 const &materialAlbedo) override
 
C3D_API ReflectionModelPtr getReflectionModel (uint32_t &envMapBinding, uint32_t envMapSet) const override
 

Diffuse + Specular

C3D_API void compute (DirectionalLight const &light, LightMaterial const &material, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows, OutputComponents &output) const override
 
C3D_API void compute (PointLight const &light, LightMaterial const &material, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows, OutputComponents &output) const override
 
C3D_API void compute (SpotLight const &light, LightMaterial const &material, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows, OutputComponents &output) const override
 
C3D_API void computeMapContributions (PassFlags const &passFlags, TextureFlagsArray const &textures, TextureConfigurations const &textureConfigs, TextureAnimations const &textureAnims, sdw::Array< sdw::CombinedImage2DRgba32 > const &maps, sdw::UVec4 const &textures0, sdw::UVec4 const &textures1, sdw::Vec3 &texCoords0, sdw::Vec3 &texCoords1, sdw::Vec3 &texCoords2, sdw::Vec3 &texCoords3, sdw::Vec3 &normal, sdw::Vec3 &tangent, sdw::Vec3 &bitangent, sdw::Vec3 &emissive, sdw::Float &opacity, sdw::Float &occlusion, sdw::Float &transmittanc, LightMaterial &lightMat, sdw::Vec3 &tangentSpaceViewPosition, sdw::Vec3 &tangentSpaceFragPosition) override
 
- Fonctions membres publiques hérités de castor3d::shader::LightingModel
C3D_API LightingModel (sdw::ShaderWriter &writer, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric, std::string prefix)
 
virtual C3D_API ~LightingModel ()=default
 
virtual C3D_API sdw::Vec3 combine (sdw::Vec3 const &directDiffuse, sdw::Vec3 const &indirectDiffuse, sdw::Vec3 const &directSpecular, sdw::Vec3 const &indirectSpecular, sdw::Vec3 const &ambient, sdw::Vec3 const &indirectAmbient, sdw::Float const &ambientOcclusion, sdw::Vec3 const &emissive, sdw::Vec3 const &reflected, sdw::Vec3 const &refracted, sdw::Vec3 const &materialAlbedo)=0
 
virtual C3D_API std::unique_ptr< LightMaterialdeclMaterial (std::string const &name, bool enabled=true)=0
 
virtual C3D_API ReflectionModelPtr getReflectionModel (uint32_t &envMapBinding, uint32_t envMapSet) const =0
 
C3D_API void declareDirectionalModel (bool lightUbo, uint32_t lightBinding, uint32_t lightSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
C3D_API void declarePointModel (bool lightUbo, uint32_t lightBinding, uint32_t lightSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
C3D_API void declareSpotModel (bool lightUbo, uint32_t lightBinding, uint32_t lightSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
C3D_API DirectionalLight getDirectionalLight (sdw::UInt const &index) const
 
C3D_API PointLight getPointLight (sdw::UInt const &index) const
 
C3D_API SpotLight getSpotLight (sdw::UInt const &index) const
 
ShadowgetShadowModel () const
 
C3D_API void declareModel (uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
C3D_API void computeCombined (LightMaterial const &material, SceneData const &sceneData, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows, OutputComponents &output) const
 
C3D_API void declareDiffuseModel (uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
C3D_API sdw::Vec3 computeCombinedDiffuse (LightMaterial const &material, SceneData const &sceneData, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows) const
 

Fonctions membres publiques statiques

static C3D_API const castor::String getName ()
 
static C3D_API LightingModelPtr create (sdw::ShaderWriter &writer, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric)
 
- Fonctions membres publiques statiques hérités de castor3d::shader::LightingModel
static C3D_API LightingModelPtr createModel (Utils &utils, castor::String const &name, uint32_t lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, SssProfiles const *sssProfiles, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
template<typename LightsBufBindingT >
static LightingModelPtr createModelT (Utils &utils, castor::String const &name, LightsBufBindingT lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, SssProfiles const *sssProfiles, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
template<typename LightBindingT >
static LightingModelPtr createModel (Utils &utils, castor::String const &name, LightType light, LightBindingT lightBinding, uint32_t lightSet, bool lightUbo, ShadowOptions const &shadows, SssProfiles const *sssProfiles, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
static C3D_API LightingModelPtr createDiffuseModel (Utils &utils, castor::String const &name, uint32_t lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
template<typename LightsBufBindingT >
static LightingModelPtr createDiffuseModelT (Utils &utils, castor::String const &name, LightsBufBindingT lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 

Diffuse only

CookTorranceBRDF m_cookTorrance
 
sdw::Function< sdw::Void, InDirectionalLight, InPbrLightMaterial, InSurface, sdw::InVec3, sdw::InInt, OutputComponents & > m_computeDirectional
 
sdw::Function< sdw::Void, InPointLight, InPbrLightMaterial, InSurface, sdw::InVec3, sdw::InInt, OutputComponents & > m_computePoint
 
sdw::Function< sdw::Void, InSpotLight, InPbrLightMaterial, InSurface, sdw::InVec3, sdw::InInt, OutputComponents & > m_computeSpot
 
sdw::Function< sdw::Vec3, InOutDirectionalLight, InPbrLightMaterial, InSurface, sdw::InVec3, sdw::InInt > m_computeDirectionalDiffuse
 
sdw::Function< sdw::Vec3, InOutPointLight, InPbrLightMaterial, InSurface, sdw::InVec3, sdw::InInt > m_computePointDiffuse
 
sdw::Function< sdw::Vec3, InOutSpotLight, InPbrLightMaterial, InSurface, sdw::InVec3, sdw::InInt > m_computeSpotDiffuse
 
C3D_API sdw::Vec3 computeDiffuse (DirectionalLight const &light, LightMaterial const &material, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows) const override
 
C3D_API sdw::Vec3 computeDiffuse (PointLight const &light, LightMaterial const &material, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows) const override
 
C3D_API sdw::Vec3 computeDiffuse (SpotLight const &light, LightMaterial const &material, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Int const &receivesShadows) const override
 
C3D_API void computeMapDiffuseContributions (PassFlags const &passFlags, TextureFlagsArray const &textures, TextureConfigurations const &textureConfigs, TextureAnimations const &textureAnims, sdw::Array< sdw::CombinedImage2DRgba32 > const &maps, sdw::UVec4 const &textures0, sdw::UVec4 const &textures1, sdw::Vec3 &texCoords0, sdw::Vec3 &texCoords1, sdw::Vec3 &texCoords2, sdw::Vec3 &texCoords3, sdw::Vec3 &emissive, sdw::Float &opacity, sdw::Float &occlusion, LightMaterial &lightMat) override
 
void doDeclareModel () override
 
void doDeclareComputeDirectionalLight () override
 
void doDeclareComputePointLight () override
 
void doDeclareComputeSpotLight () override
 
void doDeclareDiffuseModel () override
 
void doDeclareComputeDirectionalLightDiffuse () override
 
void doDeclareComputePointLightDiffuse () override
 
void doDeclareComputeSpotLightDiffuse () override
 

Membres hérités additionnels

- Fonctions membres protégées hérités de castor3d::shader::LightingModel
C3D_API Light getBaseLight (sdw::UInt &offset) const
 
C3D_API void doDeclareLightsBuffer (uint32_t binding, uint32_t set)
 
C3D_API void doDeclareDirectionalLightUbo (uint32_t binding, uint32_t set)
 
C3D_API void doDeclarePointLightUbo (uint32_t binding, uint32_t set)
 
C3D_API void doDeclareSpotLightUbo (uint32_t binding, uint32_t set)
 
C3D_API void doDeclareGetBaseLight ()
 
C3D_API void doDeclareGetDirectionalLight ()
 
C3D_API void doDeclareGetPointLight ()
 
C3D_API void doDeclareGetSpotLight ()
 
C3D_API void doDeclareGetCascadeFactors ()
 
- Attributs protégés hérités de castor3d::shader::LightingModel
sdw::ShaderWriter & m_writer
 
Utilsm_utils
 
std::unique_ptr< sdw::Struct > m_type
 
std::unique_ptr< sdw::Ssbo > m_ssbo
 
std::unique_ptr< sdw::RImageBufferRgba32 > m_tbo
 
bool m_enableVolumetric
 
std::string m_prefix
 
std::shared_ptr< Shadowm_shadowModel
 
std::shared_ptr< SssTransmittancem_sssTransmittance
 
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec4, sdw::InUInt > m_getCascadeFactors
 
sdw::Function< sdw::Vec3, sdw::InVec3, sdw::InVec4Array, sdw::InUInt > m_getTileFactors
 
sdw::Function< shader::Light, sdw::InOutUInt > m_getBaseLight
 
sdw::Function< shader::DirectionalLight, sdw::InUInt > m_getDirectionalLight
 
sdw::Function< shader::PointLight, sdw::InUInt > m_getPointLight
 
sdw::Function< shader::SpotLight, sdw::InUInt > m_getSpotLight
 

Documentation des constructeurs et destructeur

◆ PbrLightingModel()

C3D_API castor3d::shader::PbrLightingModel::PbrLightingModel ( sdw::ShaderWriter &  writer,
Utils utils,
ShadowOptions  shadowOptions,
SssProfiles const *  sssProfiles,
bool  enableVolumetric 
)
explicit

Documentation des fonctions membres

◆ combine()

C3D_API sdw::Vec3 castor3d::shader::PbrLightingModel::combine ( sdw::Vec3 const &  directDiffuse,
sdw::Vec3 const &  indirectDiffuse,
sdw::Vec3 const &  directSpecular,
sdw::Vec3 const &  indirectSpecular,
sdw::Vec3 const &  ambient,
sdw::Vec3 const &  indirectAmbient,
sdw::Float const &  ambientOcclusion,
sdw::Vec3 const &  emissive,
sdw::Vec3 const &  reflected,
sdw::Vec3 const &  refracted,
sdw::Vec3 const &  materialAlbedo 
)
overridevirtual

◆ compute() [1/3]

C3D_API void castor3d::shader::PbrLightingModel::compute ( DirectionalLight const &  light,
LightMaterial const &  material,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Int const &  receivesShadows,
OutputComponents output 
) const
overridevirtual

◆ compute() [2/3]

C3D_API void castor3d::shader::PbrLightingModel::compute ( PointLight const &  light,
LightMaterial const &  material,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Int const &  receivesShadows,
OutputComponents output 
) const
overridevirtual

◆ compute() [3/3]

C3D_API void castor3d::shader::PbrLightingModel::compute ( SpotLight const &  light,
LightMaterial const &  material,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Int const &  receivesShadows,
OutputComponents output 
) const
overridevirtual

◆ computeDiffuse() [1/3]

C3D_API sdw::Vec3 castor3d::shader::PbrLightingModel::computeDiffuse ( DirectionalLight const &  light,
LightMaterial const &  material,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Int const &  receivesShadows 
) const
overridevirtual

◆ computeDiffuse() [2/3]

C3D_API sdw::Vec3 castor3d::shader::PbrLightingModel::computeDiffuse ( PointLight const &  light,
LightMaterial const &  material,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Int const &  receivesShadows 
) const
overridevirtual

◆ computeDiffuse() [3/3]

C3D_API sdw::Vec3 castor3d::shader::PbrLightingModel::computeDiffuse ( SpotLight const &  light,
LightMaterial const &  material,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Int const &  receivesShadows 
) const
overridevirtual

◆ computeMapContributions()

C3D_API void castor3d::shader::PbrLightingModel::computeMapContributions ( PassFlags const &  passFlags,
TextureFlagsArray const &  textures,
TextureConfigurations const &  textureConfigs,
TextureAnimations const &  textureAnims,
sdw::Array< sdw::CombinedImage2DRgba32 > const &  maps,
sdw::UVec4 const &  textures0,
sdw::UVec4 const &  textures1,
sdw::Vec3 &  texCoords0,
sdw::Vec3 &  texCoords1,
sdw::Vec3 &  texCoords2,
sdw::Vec3 &  texCoords3,
sdw::Vec3 &  normal,
sdw::Vec3 &  tangent,
sdw::Vec3 &  bitangent,
sdw::Vec3 &  emissive,
sdw::Float &  opacity,
sdw::Float &  occlusion,
sdw::Float &  transmittanc,
LightMaterial lightMat,
sdw::Vec3 &  tangentSpaceViewPosition,
sdw::Vec3 &  tangentSpaceFragPosition 
)
overridevirtual

◆ computeMapDiffuseContributions()

C3D_API void castor3d::shader::PbrLightingModel::computeMapDiffuseContributions ( PassFlags const &  passFlags,
TextureFlagsArray const &  textures,
TextureConfigurations const &  textureConfigs,
TextureAnimations const &  textureAnims,
sdw::Array< sdw::CombinedImage2DRgba32 > const &  maps,
sdw::UVec4 const &  textures0,
sdw::UVec4 const &  textures1,
sdw::Vec3 &  texCoords0,
sdw::Vec3 &  texCoords1,
sdw::Vec3 &  texCoords2,
sdw::Vec3 &  texCoords3,
sdw::Vec3 &  emissive,
sdw::Float &  opacity,
sdw::Float &  occlusion,
LightMaterial lightMat 
)
overridevirtual

◆ create()

static C3D_API LightingModelPtr castor3d::shader::PbrLightingModel::create ( sdw::ShaderWriter &  writer,
Utils utils,
ShadowOptions  shadowOptions,
SssProfiles const *  sssProfiles,
bool  enableVolumetric 
)
static

◆ declMaterial()

C3D_API std::unique_ptr< LightMaterial > castor3d::shader::PbrLightingModel::declMaterial ( std::string const &  name,
bool  enabled 
)
overridevirtual

◆ doDeclareComputeDirectionalLight()

void castor3d::shader::PbrLightingModel::doDeclareComputeDirectionalLight ( )
overrideprotectedvirtual

◆ doDeclareComputeDirectionalLightDiffuse()

void castor3d::shader::PbrLightingModel::doDeclareComputeDirectionalLightDiffuse ( )
overrideprotectedvirtual

◆ doDeclareComputePointLight()

void castor3d::shader::PbrLightingModel::doDeclareComputePointLight ( )
overrideprotectedvirtual

◆ doDeclareComputePointLightDiffuse()

void castor3d::shader::PbrLightingModel::doDeclareComputePointLightDiffuse ( )
overrideprotectedvirtual

◆ doDeclareComputeSpotLight()

void castor3d::shader::PbrLightingModel::doDeclareComputeSpotLight ( )
overrideprotectedvirtual

◆ doDeclareComputeSpotLightDiffuse()

void castor3d::shader::PbrLightingModel::doDeclareComputeSpotLightDiffuse ( )
overrideprotectedvirtual

◆ doDeclareDiffuseModel()

void castor3d::shader::PbrLightingModel::doDeclareDiffuseModel ( )
overrideprotectedvirtual

◆ doDeclareModel()

void castor3d::shader::PbrLightingModel::doDeclareModel ( )
overrideprotectedvirtual

◆ getName()

static C3D_API const castor::String castor3d::shader::PbrLightingModel::getName ( )
static

◆ getReflectionModel()

C3D_API ReflectionModelPtr castor3d::shader::PbrLightingModel::getReflectionModel ( uint32_t &  envMapBinding,
uint32_t  envMapSet 
) const
overridevirtual

Documentation des données membres

◆ m_computeDirectional

sdw::Function< sdw::Void , InDirectionalLight , InPbrLightMaterial , InSurface , sdw::InVec3 , sdw::InInt , OutputComponents & > castor3d::shader::PbrLightingModel::m_computeDirectional

◆ m_computeDirectionalDiffuse

sdw::Function< sdw::Vec3 , InOutDirectionalLight , InPbrLightMaterial , InSurface , sdw::InVec3 , sdw::InInt > castor3d::shader::PbrLightingModel::m_computeDirectionalDiffuse

◆ m_computePoint

sdw::Function< sdw::Void , InPointLight , InPbrLightMaterial , InSurface , sdw::InVec3 , sdw::InInt , OutputComponents & > castor3d::shader::PbrLightingModel::m_computePoint

◆ m_computePointDiffuse

sdw::Function< sdw::Vec3 , InOutPointLight , InPbrLightMaterial , InSurface , sdw::InVec3 , sdw::InInt > castor3d::shader::PbrLightingModel::m_computePointDiffuse

◆ m_computeSpot

sdw::Function< sdw::Void , InSpotLight , InPbrLightMaterial , InSurface , sdw::InVec3 , sdw::InInt , OutputComponents & > castor3d::shader::PbrLightingModel::m_computeSpot

◆ m_computeSpotDiffuse

sdw::Function< sdw::Vec3 , InOutSpotLight , InPbrLightMaterial , InSurface , sdw::InVec3 , sdw::InInt > castor3d::shader::PbrLightingModel::m_computeSpotDiffuse

◆ m_cookTorrance

CookTorranceBRDF castor3d::shader::PbrLightingModel::m_cookTorrance

La documentation de cette classe a été générée à partir du fichier suivant :