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

#include <GlslShadow.hpp>

Public Member Functions

C3D_API Shadow (ShadowOptions shadowOptions, sdw::ShaderWriter &writer)
 
C3D_API void declare (uint32_t &index, uint32_t set)
 
C3D_API void declareDirectional (uint32_t &index, uint32_t set)
 
C3D_API void declarePoint (uint32_t &index, uint32_t set)
 
C3D_API void declareSpot (uint32_t &index, uint32_t set)
 
C3D_API bool hasMapDepthDirectional () const
 
C3D_API bool hasMapDepthPoint () const
 
C3D_API bool hasMapDepthSpot () const
 
C3D_API sdw::CombinedImage2DArrayR32 getMapDepthDirectional () const
 
C3D_API sdw::CombinedImageCubeArrayR32 getMapDepthPoint () const
 
C3D_API sdw::CombinedImage2DArrayR32 getMapDepthSpot () const
 
C3D_API sdw::UInt getMaxCascadeCount () const
 
C3D_API DirectionalShadowData getDirectionalShadows ()
 
C3D_API PointShadowData getPointShadows (sdw::Int const &index)
 
C3D_API SpotShadowData getSpotShadows (sdw::Int const &index)
 
C3D_API sdw::Float computeDirectional (shader::ShadowData const &shadows, sdw::Vec3 const &wsVertexToLight, sdw::Vec3 const &wsNormal, sdw::Vec3 const &wsPosition, sdw::Mat4 const &lightMatrix, sdw::UInt const &cascadeIndex, sdw::UInt const &maxCascade)
 
C3D_API sdw::Float computeDirectional (shader::ShadowData const &light, LightSurface const &lightSurface, sdw::Mat4 const &lightMatrix, sdw::UInt const &cascadeIndex, sdw::UInt const &maxCascade)
 
C3D_API sdw::Float computeSpot (shader::ShadowData const &light, sdw::Int const &shadowMapIndex, LightSurface const &lightSurface, sdw::Mat4 const &lightMatrix, sdw::Float const &depth)
 
C3D_API sdw::Float computePoint (shader::ShadowData const &light, sdw::Int const &shadowMapIndex, LightSurface const &lightSurface, sdw::Float const &depth)
 
C3D_API sdw::Float computeVolumetric (shader::ShadowData const &light, LightSurface const &lightSurface, sdw::Mat4 const &lightMatrix, sdw::UInt const &cascadeIndex, sdw::UInt const &maxCascade)
 
C3D_API sdw::Float computeVolumetric (shader::ShadowData const &light, LightSurface const &lightSurface, sdw::Mat4 const &lightMatrix, sdw::UInt const &cascadeIndex, sdw::UInt const &maxCascade, sdw::Float const &scattering)
 
C3D_API sdw::Float computeVolumetric (shader::ShadowData const &light, LightSurface const &lightSurface, Ray const &ray, sdw::Float const &stepLength, sdw::Mat4 const &lightMatrix, sdw::UInt const &cascadeIndex, sdw::UInt const &maxCascade, sdw::Float const &scattering)
 
C3D_API sdw::Vec4 getLightSpacePosition (sdw::Mat4 const &lightMatrix, sdw::Vec3 const &worldSpacePosition)
 
bool isEnabled () const
 

Constructor & Destructor Documentation

◆ Shadow()

C3D_API castor3d::shader::Shadow::Shadow ( ShadowOptions shadowOptions,
sdw::ShaderWriter & writer )

Member Function Documentation

◆ computeDirectional() [1/2]

C3D_API sdw::Float castor3d::shader::Shadow::computeDirectional ( shader::ShadowData const & light,
LightSurface const & lightSurface,
sdw::Mat4 const & lightMatrix,
sdw::UInt const & cascadeIndex,
sdw::UInt const & maxCascade )

◆ computeDirectional() [2/2]

C3D_API sdw::Float castor3d::shader::Shadow::computeDirectional ( shader::ShadowData const & shadows,
sdw::Vec3 const & wsVertexToLight,
sdw::Vec3 const & wsNormal,
sdw::Vec3 const & wsPosition,
sdw::Mat4 const & lightMatrix,
sdw::UInt const & cascadeIndex,
sdw::UInt const & maxCascade )

◆ computePoint()

C3D_API sdw::Float castor3d::shader::Shadow::computePoint ( shader::ShadowData const & light,
sdw::Int const & shadowMapIndex,
LightSurface const & lightSurface,
sdw::Float const & depth )

◆ computeSpot()

C3D_API sdw::Float castor3d::shader::Shadow::computeSpot ( shader::ShadowData const & light,
sdw::Int const & shadowMapIndex,
LightSurface const & lightSurface,
sdw::Mat4 const & lightMatrix,
sdw::Float const & depth )

◆ computeVolumetric() [1/3]

C3D_API sdw::Float castor3d::shader::Shadow::computeVolumetric ( shader::ShadowData const & light,
LightSurface const & lightSurface,
Ray const & ray,
sdw::Float const & stepLength,
sdw::Mat4 const & lightMatrix,
sdw::UInt const & cascadeIndex,
sdw::UInt const & maxCascade,
sdw::Float const & scattering )

◆ computeVolumetric() [2/3]

C3D_API sdw::Float castor3d::shader::Shadow::computeVolumetric ( shader::ShadowData const & light,
LightSurface const & lightSurface,
sdw::Mat4 const & lightMatrix,
sdw::UInt const & cascadeIndex,
sdw::UInt const & maxCascade )

◆ computeVolumetric() [3/3]

C3D_API sdw::Float castor3d::shader::Shadow::computeVolumetric ( shader::ShadowData const & light,
LightSurface const & lightSurface,
sdw::Mat4 const & lightMatrix,
sdw::UInt const & cascadeIndex,
sdw::UInt const & maxCascade,
sdw::Float const & scattering )

◆ declare()

C3D_API void castor3d::shader::Shadow::declare ( uint32_t & index,
uint32_t set )

◆ declareDirectional()

C3D_API void castor3d::shader::Shadow::declareDirectional ( uint32_t & index,
uint32_t set )

◆ declarePoint()

C3D_API void castor3d::shader::Shadow::declarePoint ( uint32_t & index,
uint32_t set )

◆ declareSpot()

C3D_API void castor3d::shader::Shadow::declareSpot ( uint32_t & index,
uint32_t set )

◆ getDirectionalShadows()

C3D_API DirectionalShadowData castor3d::shader::Shadow::getDirectionalShadows ( )

◆ getLightSpacePosition()

C3D_API sdw::Vec4 castor3d::shader::Shadow::getLightSpacePosition ( sdw::Mat4 const & lightMatrix,
sdw::Vec3 const & worldSpacePosition )

◆ getMapDepthDirectional()

C3D_API sdw::CombinedImage2DArrayR32 castor3d::shader::Shadow::getMapDepthDirectional ( ) const

◆ getMapDepthPoint()

C3D_API sdw::CombinedImageCubeArrayR32 castor3d::shader::Shadow::getMapDepthPoint ( ) const

◆ getMapDepthSpot()

C3D_API sdw::CombinedImage2DArrayR32 castor3d::shader::Shadow::getMapDepthSpot ( ) const

◆ getMaxCascadeCount()

C3D_API sdw::UInt castor3d::shader::Shadow::getMaxCascadeCount ( ) const

◆ getPointShadows()

C3D_API PointShadowData castor3d::shader::Shadow::getPointShadows ( sdw::Int const & index)

◆ getSpotShadows()

C3D_API SpotShadowData castor3d::shader::Shadow::getSpotShadows ( sdw::Int const & index)

◆ hasMapDepthDirectional()

C3D_API bool castor3d::shader::Shadow::hasMapDepthDirectional ( ) const

◆ hasMapDepthPoint()

C3D_API bool castor3d::shader::Shadow::hasMapDepthPoint ( ) const

◆ hasMapDepthSpot()

C3D_API bool castor3d::shader::Shadow::hasMapDepthSpot ( ) const

◆ isEnabled()

bool castor3d::shader::Shadow::isEnabled ( ) const
inline

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