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

#include <GlslPhongLighting.hpp>

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

Fonctions membres publiques

C3D_API PhongLightingModel (sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdf, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric, bool isBlinnPhong)
 
C3D_API sdw::Float getFinalTransmission (BlendComponents const &components, sdw::Vec3 const &incident) override
 
C3D_API sdw::Vec3 adjustDirectAmbient (BlendComponents const &components, sdw::Vec3 const &directAmbient) const override
 
C3D_API sdw::Vec3 adjustDirectSpecular (BlendComponents const &components, sdw::Vec3 const &directSpecular) const override
 
C3D_API ReflectionModelPtr getReflectionModel (uint32_t &envMapBinding, uint32_t envMapSet) const override
 

Diffuse + Specular

C3D_API void compute (DirectionalLight const &light, BlendComponents const &components, Surface const &surface, BackgroundModel &background, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output) override
 
C3D_API void compute (PointLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output) override
 
C3D_API void compute (SpotLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output) override
 
- Fonctions membres publiques hérités de castor3d::shader::LightingModel
C3D_API LightingModel (sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdf, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric, std::string prefix)
 
virtual C3D_API ~LightingModel ()=default
 
virtual C3D_API sdw::Float getFinalTransmission (BlendComponents const &components, sdw::Vec3 const &incident)=0
 
C3D_API sdw::Vec3 combine (BlendComponents const &components, sdw::Vec3 const &incident, sdw::Vec3 const &directDiffuse, sdw::Vec3 const &indirectDiffuse, sdw::Vec3 const &directSpecular, sdw::Vec3 const &directScattering, sdw::Vec3 const &directCoatingSpecular, sdw::Vec2 const &directSheen, sdw::Vec3 const &indirectSpecular, sdw::Vec3 const &directAmbient, sdw::Vec3 const &indirectAmbient, sdw::Float const &ambientOcclusion, sdw::Vec3 const &emissive, sdw::Vec3 reflectedDiffuse, sdw::Vec3 reflectedSpecular, sdw::Vec3 refracted, sdw::Vec3 coatReflected, sdw::Vec3 sheenReflected)
 
virtual C3D_API sdw::Vec3 adjustDirectAmbient (BlendComponents const &components, sdw::Vec3 const &directAmbient) const =0
 
virtual C3D_API sdw::Vec3 adjustDirectSpecular (BlendComponents const &components, sdw::Vec3 const &directSpecular) const =0
 
C3D_API sdw::Vec3 combine (BlendComponents const &components, sdw::Vec3 const &incident, sdw::Vec3 const &directDiffuse, sdw::Vec3 const &indirectDiffuse, sdw::Vec3 const &directSpecular, sdw::Vec3 const &directScattering, sdw::Vec3 const &directCoatingSpecular, sdw::Vec2 const &directSheen, sdw::Vec3 const &indirectSpecular, sdw::Vec3 const &directAmbient, sdw::Vec3 const &indirectAmbient, sdw::Vec3 reflectedDiffuse, sdw::Vec3 reflectedSpecular, sdw::Vec3 refracted, sdw::Vec3 coatReflected, sdw::Vec3 sheenReflected)
 
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 (BlendComponents const &components, SceneData const &sceneData, BackgroundModel &background, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows, OutputComponents &output)
 
C3D_API void declareDiffuseModel (uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
C3D_API sdw::Vec3 computeCombinedDiffuse (BlendComponents const &components, SceneData const &sceneData, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows)
 

Fonctions membres publiques statiques

static C3D_API LightingModelPtr create (sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdf, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric)
 
- Fonctions membres publiques statiques hérités de castor3d::shader::LightingModel
static C3D_API LightingModelPtr createModel (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, 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 (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, 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 (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, 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 (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, 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 (Engine const &engine, Materials const &materials, Utils &utils, BRDFHelpers &brdf, castor::String const &name, LightsBufBindingT lightsBufBinding, uint32_t lightsBufSet, ShadowOptions const &shadows, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 

Diffuse only

bool m_isBlinnPhong {}
 
std::string m_prefix
 
sdw::Function< sdw::Vec3, InLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InVec3, OutputComponents & > m_computeLight
 
sdw::Function< sdw::Void, InDirectionalLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InUInt, OutputComponents & > m_computeDirectional
 
sdw::Function< sdw::Void, InPointLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InUInt, OutputComponents & > m_computePoint
 
sdw::Function< sdw::Void, InSpotLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InUInt, OutputComponents & > m_computeSpot
 
sdw::Function< sdw::Vec3, InLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InVec3 > m_computeLightDiffuse
 
sdw::Function< sdw::Vec3, InOutDirectionalLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InUInt > m_computeDirectionalDiffuse
 
sdw::Function< sdw::Vec3, InOutPointLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InUInt > m_computePointDiffuse
 
sdw::Function< sdw::Vec3, InOutSpotLight, InBlendComponents, InSurface, sdw::InVec3, sdw::InUInt > m_computeSpotDiffuse
 
C3D_API sdw::Vec3 computeDiffuse (DirectionalLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows) override
 
C3D_API sdw::Vec3 computeDiffuse (PointLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows) override
 
C3D_API sdw::Vec3 computeDiffuse (SpotLight const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::UInt const &receivesShadows) override
 
bool isBlinnPhong () const
 
static C3D_API castor::String getName ()
 
C3D_API sdw::RetVec3 doComputeLight (Light const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Vec3 const &lightDirection, OutputComponents &output)
 
C3D_API sdw::Vec3 doComputeLightDiffuse (Light const &light, BlendComponents const &components, Surface const &surface, sdw::Vec3 const &worldEye, sdw::Vec3 const &lightDirection)
 

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
 
Materials const & m_materials
 
Utilsm_utils
 
std::unique_ptr< sdw::Struct > m_type
 
std::unique_ptr< sdw::StorageBuffer > 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

◆ PhongLightingModel()

C3D_API castor3d::shader::PhongLightingModel::PhongLightingModel ( sdw::ShaderWriter &  writer,
Materials const &  materials,
Utils utils,
BRDFHelpers brdf,
ShadowOptions  shadowOptions,
SssProfiles const *  sssProfiles,
bool  enableVolumetric,
bool  isBlinnPhong 
)

Documentation des fonctions membres

◆ adjustDirectAmbient()

C3D_API sdw::Vec3 castor3d::shader::PhongLightingModel::adjustDirectAmbient ( BlendComponents const &  components,
sdw::Vec3 const &  directAmbient 
) const
overridevirtual

◆ adjustDirectSpecular()

C3D_API sdw::Vec3 castor3d::shader::PhongLightingModel::adjustDirectSpecular ( BlendComponents const &  components,
sdw::Vec3 const &  directSpecular 
) const
overridevirtual

◆ compute() [1/3]

C3D_API void castor3d::shader::PhongLightingModel::compute ( DirectionalLight const &  light,
BlendComponents const &  components,
Surface const &  surface,
BackgroundModel background,
sdw::Vec3 const &  worldEye,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)
overridevirtual

◆ compute() [2/3]

C3D_API void castor3d::shader::PhongLightingModel::compute ( PointLight const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)
overridevirtual

◆ compute() [3/3]

C3D_API void castor3d::shader::PhongLightingModel::compute ( SpotLight const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)
overridevirtual

◆ computeDiffuse() [1/3]

C3D_API sdw::Vec3 castor3d::shader::PhongLightingModel::computeDiffuse ( DirectionalLight const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::UInt const &  receivesShadows 
)
overridevirtual

◆ computeDiffuse() [2/3]

C3D_API sdw::Vec3 castor3d::shader::PhongLightingModel::computeDiffuse ( PointLight const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::UInt const &  receivesShadows 
)
overridevirtual

◆ computeDiffuse() [3/3]

C3D_API sdw::Vec3 castor3d::shader::PhongLightingModel::computeDiffuse ( SpotLight const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::UInt const &  receivesShadows 
)
overridevirtual

◆ create()

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

◆ doComputeLight()

C3D_API sdw::RetVec3 castor3d::shader::PhongLightingModel::doComputeLight ( Light const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Vec3 const &  lightDirection,
OutputComponents output 
)
protected

◆ doComputeLightDiffuse()

C3D_API sdw::Vec3 castor3d::shader::PhongLightingModel::doComputeLightDiffuse ( Light const &  light,
BlendComponents const &  components,
Surface const &  surface,
sdw::Vec3 const &  worldEye,
sdw::Vec3 const &  lightDirection 
)
protected

◆ getFinalTransmission()

C3D_API sdw::Float castor3d::shader::PhongLightingModel::getFinalTransmission ( BlendComponents const &  components,
sdw::Vec3 const &  incident 
)
overridevirtual

◆ getName()

static C3D_API castor::String castor3d::shader::PhongLightingModel::getName ( )
static

◆ getReflectionModel()

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

◆ isBlinnPhong()

bool castor3d::shader::PhongLightingModel::isBlinnPhong ( ) const
inline

Références m_isBlinnPhong.

Documentation des données membres

◆ m_computeDirectional

sdw::Function< sdw::Void , InDirectionalLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InUInt , OutputComponents & > castor3d::shader::PhongLightingModel::m_computeDirectional

◆ m_computeDirectionalDiffuse

sdw::Function< sdw::Vec3 , InOutDirectionalLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InUInt > castor3d::shader::PhongLightingModel::m_computeDirectionalDiffuse

◆ m_computeLight

sdw::Function< sdw::Vec3 , InLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InVec3 , OutputComponents & > castor3d::shader::PhongLightingModel::m_computeLight

◆ m_computeLightDiffuse

sdw::Function< sdw::Vec3 , InLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InVec3 > castor3d::shader::PhongLightingModel::m_computeLightDiffuse

◆ m_computePoint

sdw::Function< sdw::Void , InPointLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InUInt , OutputComponents & > castor3d::shader::PhongLightingModel::m_computePoint

◆ m_computePointDiffuse

sdw::Function< sdw::Vec3 , InOutPointLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InUInt > castor3d::shader::PhongLightingModel::m_computePointDiffuse

◆ m_computeSpot

sdw::Function< sdw::Void , InSpotLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InUInt , OutputComponents & > castor3d::shader::PhongLightingModel::m_computeSpot

◆ m_computeSpotDiffuse

sdw::Function< sdw::Vec3 , InOutSpotLight , InBlendComponents , InSurface , sdw::InVec3 , sdw::InUInt > castor3d::shader::PhongLightingModel::m_computeSpotDiffuse

◆ m_isBlinnPhong

bool castor3d::shader::PhongLightingModel::m_isBlinnPhong {}

Référencé par isBlinnPhong().

◆ m_prefix

std::string castor3d::shader::PhongLightingModel::m_prefix

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