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

#include <GlslLighting.hpp>

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

Fonctions membres publiques

C3D_API LightingModel (LightingModelID lightingModelId, sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdf, Shadow &shadowModel, Lights &lights, bool hasIblSupport, bool enableVolumetric, std::string prefix)
 
virtual C3D_API ~LightingModel ()=default
 
LightingModelID getLightingModelId () const
 
bool hasIblSupport () const
 
C3D_API void finish (PassShaders const &passShaders, SurfaceBase const &surface, Utils &utils, sdw::Vec3 const worldEye, BlendComponents &components)
 
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)
 
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 sdw::Float getFinalTransmission (BlendComponents const &components, sdw::Vec3 const &incident)=0
 
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
 

Diffuse + Specular

C3D_API void compute (DirectionalLight const &light, BlendComponents const &components, BackgroundModel &background, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, OutputComponents &output)
 
C3D_API void compute (PointLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, OutputComponents &output)
 
C3D_API void compute (SpotLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, OutputComponents &output)
 

Diffuse only

LightingModelID m_lightingModelId
 
sdw::ShaderWriter & m_writer
 
Materials const & m_materials
 
Utilsm_utils
 
Shadowm_shadowModel
 
Lightsm_lights
 
bool m_hasIblSupport
 
bool m_enableVolumetric
 
std::string m_prefix
 
std::unique_ptr< sdw::Struct > m_type
 
std::unique_ptr< sdw::UInt > m_directionalCascadeIndex
 
std::unique_ptr< sdw::UInt > m_directionalCascadeCount
 
std::unique_ptr< sdw::Mat4 > m_directionalTransform
 
sdw::Function< sdw::Void, PDirectionalLight, InBlendComponents, InLightSurface, sdw::InUInt, OutputComponents & > m_computeDirectional
 
sdw::Function< sdw::Void, PPointLight, InBlendComponents, InLightSurface, sdw::InUInt, OutputComponents & > m_computePoint
 
sdw::Function< sdw::Void, PSpotLight, InBlendComponents, InLightSurface, sdw::InUInt, OutputComponents & > m_computeSpot
 
sdw::Function< sdw::Vec3, InOutDirectionalLight, InBlendComponents, InLightSurface, sdw::InUInt > m_computeDirectionalDiffuse
 
sdw::Function< sdw::Vec3, InOutPointLight, InBlendComponents, InLightSurface, sdw::InUInt > m_computePointDiffuse
 
sdw::Function< sdw::Vec3, InOutSpotLight, InBlendComponents, InLightSurface, sdw::InUInt > m_computeSpotDiffuse
 
C3D_API sdw::Vec3 computeDiffuse (DirectionalLight const &light, BlendComponents const &components, BackgroundModel &background, LightSurface const &lightSurface, sdw::UInt const &receivesShadows)
 
C3D_API sdw::Vec3 computeDiffuse (PointLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows)
 
C3D_API sdw::Vec3 computeDiffuse (SpotLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows)
 
C3D_API void doComputeAttenuation (sdw::Float const attenuation, OutputComponents &output)
 
C3D_API void doApplyShadows (DirectionalLight const &light, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, OutputComponents &output)
 
C3D_API void doApplyShadows (PointLight const &light, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, OutputComponents &output)
 
C3D_API void doApplyShadows (SpotLight const &light, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, OutputComponents &output)
 
C3D_API void doApplyShadowsDiffuse (DirectionalLight const &light, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, sdw::Vec3 &output)
 
C3D_API void doApplyShadowsDiffuse (PointLight const &light, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, sdw::Vec3 &output)
 
C3D_API void doApplyShadowsDiffuse (SpotLight const &light, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, sdw::Vec3 &output)
 
virtual C3D_API void doInitialiseBackground (BackgroundModel &background)
 
virtual C3D_API sdw::Vec3 doComputeRadiance (Light const &light, sdw::Vec3 const &lightDirection) const
 
virtual C3D_API void doComputeSheenTerm (sdw::Vec3 const &radiance, sdw::Float const &intensity, BlendComponents const &components, LightSurface const &lightSurface, sdw::Float const &isLit, sdw::Vec2 &output)
 
virtual C3D_API void doComputeScatteringTerm (sdw::Vec3 const &radiance, Light const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::Vec3 &output)
 
virtual C3D_API sdw::Float doGetNdotL (LightSurface const &lightSurface, BlendComponents const &components)
 
virtual C3D_API sdw::Float doGetNdotH (LightSurface const &lightSurface, BlendComponents const &components)
 
virtual C3D_API void doFinish (BlendComponents &components)=0
 
virtual C3D_API sdw::Vec3 doComputeDiffuseTerm (sdw::Vec3 const &radiance, sdw::Float const &intensity, BlendComponents const &components, LightSurface const &lightSurface, sdw::Float &isLit, sdw::Vec3 &output)=0
 
virtual C3D_API void doComputeSpecularTerm (sdw::Vec3 const &radiance, sdw::Float const &intensity, BlendComponents const &components, LightSurface const &lightSurface, sdw::Float const &isLit, sdw::Vec3 &output)=0
 
virtual C3D_API void doComputeCoatingTerm (sdw::Vec3 const &radiance, sdw::Float const &intensity, BlendComponents const &components, LightSurface const &lightSurface, sdw::Float const &isLit, sdw::Vec3 &output)=0
 

Documentation des constructeurs et destructeur

◆ LightingModel()

C3D_API castor3d::shader::LightingModel::LightingModel ( LightingModelID  lightingModelId,
sdw::ShaderWriter &  writer,
Materials const &  materials,
Utils utils,
BRDFHelpers brdf,
Shadow shadowModel,
Lights lights,
bool  hasIblSupport,
bool  enableVolumetric,
std::string  prefix 
)

◆ ~LightingModel()

virtual C3D_API castor3d::shader::LightingModel::~LightingModel ( )
virtualdefault

Documentation des fonctions membres

◆ adjustDirectAmbient()

virtual C3D_API sdw::Vec3 castor3d::shader::LightingModel::adjustDirectAmbient ( BlendComponents const &  components,
sdw::Vec3 const &  directAmbient 
) const
pure virtual

◆ adjustDirectSpecular()

virtual C3D_API sdw::Vec3 castor3d::shader::LightingModel::adjustDirectSpecular ( BlendComponents const &  components,
sdw::Vec3 const &  directSpecular 
) const
pure virtual

◆ combine() [1/2]

C3D_API sdw::Vec3 castor3d::shader::LightingModel::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 
)

◆ combine() [2/2]

C3D_API sdw::Vec3 castor3d::shader::LightingModel::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 
)

◆ compute() [1/3]

C3D_API void castor3d::shader::LightingModel::compute ( DirectionalLight const &  light,
BlendComponents const &  components,
BackgroundModel background,
LightSurface const &  lightSurface,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)

◆ compute() [2/3]

C3D_API void castor3d::shader::LightingModel::compute ( PointLight const &  light,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)

◆ compute() [3/3]

C3D_API void castor3d::shader::LightingModel::compute ( SpotLight const &  light,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)

◆ computeDiffuse() [1/3]

C3D_API sdw::Vec3 castor3d::shader::LightingModel::computeDiffuse ( DirectionalLight const &  light,
BlendComponents const &  components,
BackgroundModel background,
LightSurface const &  lightSurface,
sdw::UInt const &  receivesShadows 
)

◆ computeDiffuse() [2/3]

C3D_API sdw::Vec3 castor3d::shader::LightingModel::computeDiffuse ( PointLight const &  light,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::UInt const &  receivesShadows 
)

◆ computeDiffuse() [3/3]

C3D_API sdw::Vec3 castor3d::shader::LightingModel::computeDiffuse ( SpotLight const &  light,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::UInt const &  receivesShadows 
)

◆ doApplyShadows() [1/3]

C3D_API void castor3d::shader::LightingModel::doApplyShadows ( DirectionalLight const &  light,
LightSurface const &  lightSurface,
sdw::Vec3 const &  radiance,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)
protected

◆ doApplyShadows() [2/3]

C3D_API void castor3d::shader::LightingModel::doApplyShadows ( PointLight const &  light,
LightSurface const &  lightSurface,
sdw::Vec3 const &  radiance,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)
protected

◆ doApplyShadows() [3/3]

C3D_API void castor3d::shader::LightingModel::doApplyShadows ( SpotLight const &  light,
LightSurface const &  lightSurface,
sdw::Vec3 const &  radiance,
sdw::UInt const &  receivesShadows,
OutputComponents output 
)
protected

◆ doApplyShadowsDiffuse() [1/3]

C3D_API void castor3d::shader::LightingModel::doApplyShadowsDiffuse ( DirectionalLight const &  light,
LightSurface const &  lightSurface,
sdw::Vec3 const &  radiance,
sdw::UInt const &  receivesShadows,
sdw::Vec3 &  output 
)
protected

◆ doApplyShadowsDiffuse() [2/3]

C3D_API void castor3d::shader::LightingModel::doApplyShadowsDiffuse ( PointLight const &  light,
LightSurface const &  lightSurface,
sdw::Vec3 const &  radiance,
sdw::UInt const &  receivesShadows,
sdw::Vec3 &  output 
)
protected

◆ doApplyShadowsDiffuse() [3/3]

C3D_API void castor3d::shader::LightingModel::doApplyShadowsDiffuse ( SpotLight const &  light,
LightSurface const &  lightSurface,
sdw::Vec3 const &  radiance,
sdw::UInt const &  receivesShadows,
sdw::Vec3 &  output 
)
protected

◆ doComputeAttenuation()

C3D_API void castor3d::shader::LightingModel::doComputeAttenuation ( sdw::Float const  attenuation,
OutputComponents output 
)
protected

◆ doComputeCoatingTerm()

virtual C3D_API void castor3d::shader::LightingModel::doComputeCoatingTerm ( sdw::Vec3 const &  radiance,
sdw::Float const &  intensity,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::Float const &  isLit,
sdw::Vec3 &  output 
)
protectedpure virtual

◆ doComputeDiffuseTerm()

virtual C3D_API sdw::Vec3 castor3d::shader::LightingModel::doComputeDiffuseTerm ( sdw::Vec3 const &  radiance,
sdw::Float const &  intensity,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::Float &  isLit,
sdw::Vec3 &  output 
)
protectedpure virtual

◆ doComputeRadiance()

virtual C3D_API sdw::Vec3 castor3d::shader::LightingModel::doComputeRadiance ( Light const &  light,
sdw::Vec3 const &  lightDirection 
) const
protectedvirtual

◆ doComputeScatteringTerm()

virtual C3D_API void castor3d::shader::LightingModel::doComputeScatteringTerm ( sdw::Vec3 const &  radiance,
Light const &  light,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::Vec3 &  output 
)
protectedvirtual

◆ doComputeSheenTerm()

virtual C3D_API void castor3d::shader::LightingModel::doComputeSheenTerm ( sdw::Vec3 const &  radiance,
sdw::Float const &  intensity,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::Float const &  isLit,
sdw::Vec2 &  output 
)
protectedvirtual

Réimplémentée dans castor3d::shader::PbrLightingModel.

◆ doComputeSpecularTerm()

virtual C3D_API void castor3d::shader::LightingModel::doComputeSpecularTerm ( sdw::Vec3 const &  radiance,
sdw::Float const &  intensity,
BlendComponents const &  components,
LightSurface const &  lightSurface,
sdw::Float const &  isLit,
sdw::Vec3 &  output 
)
protectedpure virtual

◆ doFinish()

virtual C3D_API void castor3d::shader::LightingModel::doFinish ( BlendComponents components)
protectedpure virtual

◆ doGetNdotH()

virtual C3D_API sdw::Float castor3d::shader::LightingModel::doGetNdotH ( LightSurface const &  lightSurface,
BlendComponents const &  components 
)
protectedvirtual

◆ doGetNdotL()

virtual C3D_API sdw::Float castor3d::shader::LightingModel::doGetNdotL ( LightSurface const &  lightSurface,
BlendComponents const &  components 
)
protectedvirtual

◆ doInitialiseBackground()

virtual C3D_API void castor3d::shader::LightingModel::doInitialiseBackground ( BackgroundModel background)
protectedvirtual

◆ finish()

C3D_API void castor3d::shader::LightingModel::finish ( PassShaders const &  passShaders,
SurfaceBase const &  surface,
Utils utils,
sdw::Vec3 const  worldEye,
BlendComponents components 
)

◆ getFinalTransmission()

virtual C3D_API sdw::Float castor3d::shader::LightingModel::getFinalTransmission ( BlendComponents const &  components,
sdw::Vec3 const &  incident 
)
pure virtual

◆ getLightingModelId()

LightingModelID castor3d::shader::LightingModel::getLightingModelId ( ) const
inline

Références m_lightingModelId.

◆ hasIblSupport()

bool castor3d::shader::LightingModel::hasIblSupport ( ) const
inline

Références m_hasIblSupport.

Documentation des données membres

◆ m_computeDirectional

sdw::Function< sdw::Void , PDirectionalLight , InBlendComponents , InLightSurface , sdw::InUInt , OutputComponents & > castor3d::shader::LightingModel::m_computeDirectional
protected

◆ m_computeDirectionalDiffuse

sdw::Function< sdw::Vec3 , InOutDirectionalLight , InBlendComponents , InLightSurface , sdw::InUInt > castor3d::shader::LightingModel::m_computeDirectionalDiffuse
protected

◆ m_computePoint

sdw::Function< sdw::Void , PPointLight , InBlendComponents , InLightSurface , sdw::InUInt , OutputComponents & > castor3d::shader::LightingModel::m_computePoint
protected

◆ m_computePointDiffuse

sdw::Function< sdw::Vec3 , InOutPointLight , InBlendComponents , InLightSurface , sdw::InUInt > castor3d::shader::LightingModel::m_computePointDiffuse
protected

◆ m_computeSpot

sdw::Function< sdw::Void , PSpotLight , InBlendComponents , InLightSurface , sdw::InUInt , OutputComponents & > castor3d::shader::LightingModel::m_computeSpot
protected

◆ m_computeSpotDiffuse

sdw::Function< sdw::Vec3 , InOutSpotLight , InBlendComponents , InLightSurface , sdw::InUInt > castor3d::shader::LightingModel::m_computeSpotDiffuse
protected

◆ m_directionalCascadeCount

std::unique_ptr< sdw::UInt > castor3d::shader::LightingModel::m_directionalCascadeCount
protected

◆ m_directionalCascadeIndex

std::unique_ptr< sdw::UInt > castor3d::shader::LightingModel::m_directionalCascadeIndex
protected

◆ m_directionalTransform

std::unique_ptr< sdw::Mat4 > castor3d::shader::LightingModel::m_directionalTransform
protected

◆ m_enableVolumetric

bool castor3d::shader::LightingModel::m_enableVolumetric
protected

◆ m_hasIblSupport

bool castor3d::shader::LightingModel::m_hasIblSupport
protected

Référencé par hasIblSupport().

◆ m_lightingModelId

LightingModelID castor3d::shader::LightingModel::m_lightingModelId
protected

Référencé par getLightingModelId().

◆ m_lights

Lights& castor3d::shader::LightingModel::m_lights
protected

◆ m_materials

Materials const& castor3d::shader::LightingModel::m_materials
protected

◆ m_prefix

std::string castor3d::shader::LightingModel::m_prefix
protected

◆ m_shadowModel

Shadow& castor3d::shader::LightingModel::m_shadowModel
protected

◆ m_type

std::unique_ptr< sdw::Struct > castor3d::shader::LightingModel::m_type
protected

◆ m_utils

Utils& castor3d::shader::LightingModel::m_utils
protected

◆ m_writer

sdw::ShaderWriter& castor3d::shader::LightingModel::m_writer
protected

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