Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::shader::Lights Class Reference

#include <GlslLight.hpp>

Public Member Functions

C3D_API Lights (Engine const &engine, LightingModelID lightingModelId, BackgroundModelID backgroundModelId, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric)
 
C3D_API Lights (Engine const &engine, LightingModelID lightingModelId, BackgroundModelID backgroundModelId, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
C3D_API Lights (Engine const &engine, LightingModelID lightingModelId, BackgroundModelID backgroundModelId, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, LightType lightType, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
 Lights (Engine const &engine, LightingModelID lightingModelId, BackgroundModelID backgroundModelId, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles)
 
 Lights (Engine const &engine, LightingModelID lightingModelId, BackgroundModelID backgroundModelId, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
 Lights (Engine const &engine, LightingModelID lightingModelId, BackgroundModelID backgroundModelId, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, LightType lightType, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
 Lights (Engine const &engine, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, bool enableVolumetric)
 
 Lights (Engine const &engine, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
 Lights (Engine const &engine, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, LightType lightType, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet, bool enableVolumetric)
 
 Lights (Engine const &engine, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles)
 
 Lights (Engine const &engine, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 
 Lights (Engine const &engine, Materials const &materials, BRDFHelpers &brdf, Utils &utils, ShadowOptions shadowOptions, SssProfiles const *sssProfiles, LightType lightType, uint32_t lightsBufBinding, uint32_t lightsBufSet, uint32_t &shadowMapBinding, uint32_t shadowMapSet)
 

Clustered Lighting, all paths

C3D_API void computeCombinedDifSpec (ClusteredLights &clusteredLights, BlendComponents const &components, BackgroundModel &backgroundModel, LightSurface const &lightSurface, sdw::UInt const receivesShadows, sdw::Vec2 const screenPosition, sdw::Float const viewDepth, DebugOutput &debugOutput, DirectLighting &output)
 
C3D_API void computeCombinedAllButDif (ClusteredLights &clusteredLights, BlendComponents const &components, BackgroundModel &backgroundModel, LightSurface const &lightSurface, sdw::UInt const receivesShadows, sdw::Vec2 const screenPosition, sdw::Float const viewDepth, sdw::Vec3 const diffuse, DebugOutput &debugOutput, DirectLighting &output)
 
C3D_API void computeCombinedDif (ClusteredLights &clusteredLights, BlendComponents const &components, BackgroundModel &backgroundModel, LightSurface const &lightSurface, sdw::UInt const receivesShadows, sdw::Vec2 const screenPosition, sdw::Float const viewDepth, DebugOutput &debugOutput, sdw::Vec3 &output)
 

Non clustered, all paths.

C3D_API void computeCombinedDifSpec (BlendComponents const &components, BackgroundModel &backgroundModel, LightSurface const &lightSurface, sdw::UInt const receivesShadows, DebugOutput &debugOutput, DirectLighting &output)
 
C3D_API void computeCombinedAllButDif (BlendComponents const &components, BackgroundModel &backgroundModel, LightSurface const &lightSurface, sdw::UInt const receivesShadows, sdw::Vec3 const diffuse, DebugOutput &debugOutput, DirectLighting &output)
 
C3D_API void computeCombinedDif (BlendComponents const &components, BackgroundModel &backgroundModel, LightSurface const &lightSurface, sdw::UInt const &receivesShadows, DebugOutput &debugOutput, sdw::Vec3 &output)
 

Backlit transmittance.

C3D_API sdw::Vec3 computeSssTransmittance (DebugOutput &debugOutput, BlendComponents const &components, DirectionalLight const &directionalLight, DirectionalShadowData const &directionalShadows, LightSurface const &lightSurface)
 
C3D_API sdw::Vec3 computeSssTransmittance (DebugOutput &debugOutput, BlendComponents const &components, PointLight const &pointLight, PointShadowData const &pointShadows, LightSurface const &lightSurface)
 
C3D_API sdw::Vec3 computeSssTransmittance (DebugOutput &debugOutput, BlendComponents const &components, SpotLight const &spotLight, SpotShadowData const &spotShadows, LightSurface const &lightSurface)
 
C3D_API bool hasIblSupport ()
 
C3D_API LightingModelgetLightingModel ()
 

Light accessors

C3D_API DirectionalLight retrieveDirectionalLight (sdw::UInt const &index)
 
C3D_API PointLight retrievePointLight (sdw::UInt const &index)
 
C3D_API SpotLight retrieveSpotLight (sdw::UInt const &index)
 
C3D_API DirectionalLight getDirectionalLight (sdw::UInt const &offset)
 
C3D_API PointLight getPointLight (sdw::UInt const &offset)
 
C3D_API SpotLight getSpotLight (sdw::UInt const &offset)
 
C3D_API sdw::Vec3 getCascadeFactors (DirectionalShadowData const light, sdw::Vec3 viewVertex, sdw::UInt maxCascadeCount)
 
ShadowgetShadowModel () const noexcept
 
sdw::UInt getDirectionalsEnd () const
 
sdw::UInt getPointsEnd () const
 
sdw::UInt getSpotsEnd () const
 
sdw::UInt getClusteredGridScale () const noexcept
 
bool hasSssTransmittance () const noexcept
 

Constructor & Destructor Documentation

◆ Lights() [1/12]

C3D_API castor3d::shader::Lights::Lights ( Engine const & engine,
LightingModelID lightingModelId,
BackgroundModelID backgroundModelId,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
bool enableVolumetric )

◆ Lights() [2/12]

C3D_API castor3d::shader::Lights::Lights ( Engine const & engine,
LightingModelID lightingModelId,
BackgroundModelID backgroundModelId,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet,
bool enableVolumetric )

◆ Lights() [3/12]

C3D_API castor3d::shader::Lights::Lights ( Engine const & engine,
LightingModelID lightingModelId,
BackgroundModelID backgroundModelId,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
LightType lightType,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet,
bool enableVolumetric )

◆ Lights() [4/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
LightingModelID lightingModelId,
BackgroundModelID backgroundModelId,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles )
inline

◆ Lights() [5/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
LightingModelID lightingModelId,
BackgroundModelID backgroundModelId,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet )
inline

◆ Lights() [6/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
LightingModelID lightingModelId,
BackgroundModelID backgroundModelId,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
LightType lightType,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet )
inline

◆ Lights() [7/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
bool enableVolumetric )
inline

◆ Lights() [8/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet,
bool enableVolumetric )
inline

◆ Lights() [9/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
LightType lightType,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet,
bool enableVolumetric )
inline

◆ Lights() [10/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles )
inline

◆ Lights() [11/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet )
inline

◆ Lights() [12/12]

castor3d::shader::Lights::Lights ( Engine const & engine,
Materials const & materials,
BRDFHelpers & brdf,
Utils & utils,
ShadowOptions shadowOptions,
SssProfiles const * sssProfiles,
LightType lightType,
uint32_t lightsBufBinding,
uint32_t lightsBufSet,
uint32_t & shadowMapBinding,
uint32_t shadowMapSet )
inline

Member Function Documentation

◆ computeCombinedAllButDif() [1/2]

C3D_API void castor3d::shader::Lights::computeCombinedAllButDif ( BlendComponents const & components,
BackgroundModel & backgroundModel,
LightSurface const & lightSurface,
sdw::UInt const receivesShadows,
sdw::Vec3 const diffuse,
DebugOutput & debugOutput,
DirectLighting & output )

◆ computeCombinedAllButDif() [2/2]

C3D_API void castor3d::shader::Lights::computeCombinedAllButDif ( ClusteredLights & clusteredLights,
BlendComponents const & components,
BackgroundModel & backgroundModel,
LightSurface const & lightSurface,
sdw::UInt const receivesShadows,
sdw::Vec2 const screenPosition,
sdw::Float const viewDepth,
sdw::Vec3 const diffuse,
DebugOutput & debugOutput,
DirectLighting & output )

◆ computeCombinedDif() [1/2]

C3D_API void castor3d::shader::Lights::computeCombinedDif ( BlendComponents const & components,
BackgroundModel & backgroundModel,
LightSurface const & lightSurface,
sdw::UInt const & receivesShadows,
DebugOutput & debugOutput,
sdw::Vec3 & output )

◆ computeCombinedDif() [2/2]

C3D_API void castor3d::shader::Lights::computeCombinedDif ( ClusteredLights & clusteredLights,
BlendComponents const & components,
BackgroundModel & backgroundModel,
LightSurface const & lightSurface,
sdw::UInt const receivesShadows,
sdw::Vec2 const screenPosition,
sdw::Float const viewDepth,
DebugOutput & debugOutput,
sdw::Vec3 & output )

◆ computeCombinedDifSpec() [1/2]

C3D_API void castor3d::shader::Lights::computeCombinedDifSpec ( BlendComponents const & components,
BackgroundModel & backgroundModel,
LightSurface const & lightSurface,
sdw::UInt const receivesShadows,
DebugOutput & debugOutput,
DirectLighting & output )

◆ computeCombinedDifSpec() [2/2]

C3D_API void castor3d::shader::Lights::computeCombinedDifSpec ( ClusteredLights & clusteredLights,
BlendComponents const & components,
BackgroundModel & backgroundModel,
LightSurface const & lightSurface,
sdw::UInt const receivesShadows,
sdw::Vec2 const screenPosition,
sdw::Float const viewDepth,
DebugOutput & debugOutput,
DirectLighting & output )

◆ computeSssTransmittance() [1/3]

C3D_API sdw::Vec3 castor3d::shader::Lights::computeSssTransmittance ( DebugOutput & debugOutput,
BlendComponents const & components,
DirectionalLight const & directionalLight,
DirectionalShadowData const & directionalShadows,
LightSurface const & lightSurface )

◆ computeSssTransmittance() [2/3]

C3D_API sdw::Vec3 castor3d::shader::Lights::computeSssTransmittance ( DebugOutput & debugOutput,
BlendComponents const & components,
PointLight const & pointLight,
PointShadowData const & pointShadows,
LightSurface const & lightSurface )

◆ computeSssTransmittance() [3/3]

C3D_API sdw::Vec3 castor3d::shader::Lights::computeSssTransmittance ( DebugOutput & debugOutput,
BlendComponents const & components,
SpotLight const & spotLight,
SpotShadowData const & spotShadows,
LightSurface const & lightSurface )

◆ getCascadeFactors()

C3D_API sdw::Vec3 castor3d::shader::Lights::getCascadeFactors ( DirectionalShadowData const light,
sdw::Vec3 viewVertex,
sdw::UInt maxCascadeCount )

◆ getClusteredGridScale()

sdw::UInt castor3d::shader::Lights::getClusteredGridScale ( ) const
inlinenoexcept

References CU_Require.

◆ getDirectionalLight()

C3D_API DirectionalLight castor3d::shader::Lights::getDirectionalLight ( sdw::UInt const & offset)

◆ getDirectionalsEnd()

sdw::UInt castor3d::shader::Lights::getDirectionalsEnd ( ) const
inline

References CU_Require.

◆ getLightingModel()

C3D_API LightingModel * castor3d::shader::Lights::getLightingModel ( )

◆ getPointLight()

C3D_API PointLight castor3d::shader::Lights::getPointLight ( sdw::UInt const & offset)

◆ getPointsEnd()

sdw::UInt castor3d::shader::Lights::getPointsEnd ( ) const
inline

References CU_Require.

◆ getShadowModel()

Shadow & castor3d::shader::Lights::getShadowModel ( ) const
inlinenoexcept

◆ getSpotLight()

C3D_API SpotLight castor3d::shader::Lights::getSpotLight ( sdw::UInt const & offset)

◆ getSpotsEnd()

sdw::UInt castor3d::shader::Lights::getSpotsEnd ( ) const
inline

References CU_Require.

◆ hasIblSupport()

C3D_API bool castor3d::shader::Lights::hasIblSupport ( )

◆ hasSssTransmittance()

bool castor3d::shader::Lights::hasSssTransmittance ( ) const
inlinenoexcept

◆ retrieveDirectionalLight()

C3D_API DirectionalLight castor3d::shader::Lights::retrieveDirectionalLight ( sdw::UInt const & index)

◆ retrievePointLight()

C3D_API PointLight castor3d::shader::Lights::retrievePointLight ( sdw::UInt const & index)

◆ retrieveSpotLight()

C3D_API SpotLight castor3d::shader::Lights::retrieveSpotLight ( sdw::UInt const & index)

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