Castor3D 0.17.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | List of all members
castor3d::shader::PhongLightingModel Class Reference

#include <GlslPhongLighting.hpp>

Inheritance diagram for castor3d::shader::PhongLightingModel:
Inheritance graph
[legend]
Collaboration diagram for castor3d::shader::PhongLightingModel:
Collaboration graph
[legend]

Public Member Functions

C3D_API PhongLightingModel (LightingModelID lightingModelId, sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdfHelpers, LightingModelSpec spec, Shadow &shadowModel, Lights &lights, bool enableVolumetric)
 
- Public Member Functions inherited from castor3d::shader::LightingModel
C3D_API LightingModel (LightingModelID lightingModelId, sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdfHelpers, LightingModelSpec spec, Shadow &shadowModel, Lights &lights, bool hasIblSupport, bool hasBackgroundReflectionsSupport, bool hasBackgroundRefractionSupport, bool enableVolumetric, castor::String prefix)
 
virtual C3D_API ~LightingModel ()=default
 
LightingModelID getLightingModelId () const
 
bool hasIblSupport () const
 
bool hasBackgroundReflectionsSupport () const
 
bool hasBackgroundRefractionSupport () const
 
C3D_API sdw::Vec3 combine (DebugOutput &debugOutput, ReflectionModel &reflections, sdw::CombinedImage2DRgba32 const &brdf, BlendComponents const &components, LightSurface const &lightSurface, sdw::Vec3 const &incident, sdw::Float const &ambientOcclusion, DirectLighting const &directLighting, IndirectLighting const &indirectLighting, ReflectionRefraction const &reflRefr)
 
C3D_API void compute (DebugOutputCategory const &debugOutput, DirectionalLight const &light, BlendComponents const &components, BackgroundModel &background, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DirectLighting &output)
 
C3D_API void compute (DebugOutputCategory const &debugOutput, PointLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DirectLighting &output)
 
C3D_API void compute (DebugOutputCategory const &debugOutput, SpotLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DirectLighting &output)
 
C3D_API sdw::Vec3 computeDiffuse (DebugOutputCategory const &debugOutput, DirectionalLight const &light, BlendComponents const &components, BackgroundModel &background, LightSurface const &lightSurface, sdw::UInt const &receivesShadows)
 
C3D_API sdw::Vec3 computeDiffuse (DebugOutputCategory const &debugOutput, PointLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows)
 
C3D_API sdw::Vec3 computeDiffuse (DebugOutputCategory const &debugOutput, SpotLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows)
 
C3D_API void computeAllButDiffuse (DebugOutputCategory const &debugOutput, DirectionalLight const &light, BlendComponents const &components, BackgroundModel &background, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DirectLighting &output)
 
C3D_API void computeAllButDiffuse (DebugOutputCategory const &debugOutput, PointLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DirectLighting &output)
 
C3D_API void computeAllButDiffuse (DebugOutputCategory const &debugOutput, SpotLight const &light, BlendComponents const &components, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DirectLighting &output)
 
C3D_API void applyVolumetric (ShadowData const &shadows, sdw::Int const shadowMapIndex, sdw::Float const &lightIntensity, LightSurface const &lightSurface, sdw::Vec3 output, bool multiply)
 

Static Public Member Functions

static C3D_API castor::StringView getName ()
 
static C3D_API LightingModelPtr create (LightingModelID lightingModelId, LightingModelDesc const &desc, sdw::ShaderWriter &writer, Materials const &materials, Utils &utils, BRDFHelpers &brdfHelpers, Shadow &shadowModel, Lights &lights, bool enableVolumetric)
 

Additional Inherited Members

- Protected Member Functions inherited from castor3d::shader::LightingModel
C3D_API void doApplyShadows (DirectionalShadowData const &light, sdw::Int const shadowMapIndex, sdw::Float const &lightIntensity, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, DirectLighting &output, bool withDiffuse=true)
 
C3D_API void doApplyShadows (PointShadowData const &light, sdw::Int const shadowMapIndex, sdw::Float const lightRange, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, DirectLighting &output, bool withDiffuse=true)
 
C3D_API void doApplyShadows (SpotShadowData const &light, sdw::Int const shadowMapIndex, sdw::Float const lightRange, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, DirectLighting &output, bool withDiffuse=true)
 
C3D_API void doApplyShadowsDiffuse (DirectionalShadowData const &light, sdw::Int const shadowMapIndex, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, sdw::Vec3 &output)
 
C3D_API void doApplyShadowsDiffuse (PointShadowData const &light, sdw::Int const shadowMapIndex, sdw::Float const lightRange, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, sdw::Vec3 &output)
 
C3D_API void doApplyShadowsDiffuse (SpotShadowData const &light, sdw::Int const shadowMapIndex, sdw::Float const lightRange, LightSurface const &lightSurface, sdw::Vec3 const &radiance, sdw::UInt const &receivesShadows, sdw::Vec3 &output)
 
virtual C3D_API void doInitLightSpecifics (LightSurface const &lightSurface, BlendComponents const &components)
 
virtual C3D_API DerivFloat doGetNdotL (LightSurface const &lightSurface, BlendComponents const &components)
 
virtual C3D_API DerivFloat doGetNdotH (LightSurface const &lightSurface, BlendComponents const &components)
 
virtual C3D_API void doComputeBackgroundLayers (DebugOutputCategory const &debugOutput, BlendComponents const &components, ReflectionRefraction const &reflRefr, sdw::Vec3 const &clearcoatFresnel, sdw::Vec3 &backgroundResult)
 
- Protected Attributes inherited from castor3d::shader::LightingModel
LightingModelID m_lightingModelId
 
sdw::ShaderWriter & m_writer
 
Materials const & m_materials
 
Utilsm_utils
 
BRDFHelpersm_brdfHelpers
 
Shadowm_shadowModel
 
Lightsm_lights
 
DiffuseBRDFPtr m_diffuse
 
SpecularBRDFPtr m_specular
 
SheenBRDFPtr m_sheen
 
ClearcoatBRDFPtr m_clearcoat
 
ScatteringModelPtr m_scattering
 
bool m_hasBackgroundReflectionsSupport
 
bool m_hasBackgroundRefractionSupport
 
bool m_hasIblSupport
 
bool m_enableVolumetric
 
castor::String m_prefix
 
castor::RawUniquePtr< sdw::Struct > m_type
 
castor::RawUniquePtr< sdw::UInt > m_directionalCascadeIndex
 
castor::RawUniquePtr< sdw::UInt > m_directionalCascadeCount
 
castor::RawUniquePtr< sdw::Mat4 > m_directionalTransform
 
sdw::Function< sdw::Void, PDirectionalLight, InBlendComponents, InLightSurface, sdw::InUInt, InOutDirectLighting > m_computeDirectional
 
sdw::Function< sdw::Void, PPointLight, InBlendComponents, InLightSurface, sdw::InUInt, InOutDirectLighting > m_computePoint
 
sdw::Function< sdw::Void, PSpotLight, InBlendComponents, InLightSurface, sdw::InUInt, InOutDirectLighting > 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
 
sdw::Function< sdw::Void, PDirectionalLight, InBlendComponents, InLightSurface, sdw::InUInt, InOutDirectLighting > m_computeDirectionalAllButDiffuse
 
sdw::Function< sdw::Void, PPointLight, InBlendComponents, InLightSurface, sdw::InUInt, InOutDirectLighting > m_computePointAllButDiffuse
 
sdw::Function< sdw::Void, PSpotLight, InBlendComponents, InLightSurface, sdw::InUInt, InOutDirectLighting > m_computeSpotAllButDiffuse
 

Constructor & Destructor Documentation

◆ PhongLightingModel()

C3D_API castor3d::shader::PhongLightingModel::PhongLightingModel ( LightingModelID lightingModelId,
sdw::ShaderWriter & writer,
Materials const & materials,
Utils & utils,
BRDFHelpers & brdfHelpers,
LightingModelSpec spec,
Shadow & shadowModel,
Lights & lights,
bool enableVolumetric )

Member Function Documentation

◆ create()

static C3D_API LightingModelPtr castor3d::shader::PhongLightingModel::create ( LightingModelID lightingModelId,
LightingModelDesc const & desc,
sdw::ShaderWriter & writer,
Materials const & materials,
Utils & utils,
BRDFHelpers & brdfHelpers,
Shadow & shadowModel,
Lights & lights,
bool enableVolumetric )
static

◆ getName()

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

The documentation for this class was generated from the following file: