17#define FLT_MAX 3.402823466e+38F
21#define FLT_MIN 1.175494351e-38F
Helper class for creating and rendering Cascading Shadow Maps.
Definition csmutil.h:28
const Math::mat4 & GetShadowView() const
gets the shadow view transform (valid after Compute)
Definition csmutil.h:151
Math::vec4 frustumCenter
Definition csmutil.h:81
Util::FixedArray< float > intervalDistances
Definition csmutil.h:87
Util::FixedArray< float > cascadeDistances
Definition csmutil.h:87
void SetBlurSize(int size)
sets the CSM blur size
void SetGlobalLight(const Graphics::GraphicsEntityId globalLight)
sets the global light entity
Definition csmutil.h:124
uint numCascades
Definition csmutil.h:85
const Graphics::GraphicsEntityId GetCameraEntity() const
get the camera entity
Definition csmutil.h:115
Graphics::GraphicsEntityId cameraEntity
Definition csmutil.h:83
Math::mat4 shadowView
Definition csmutil.h:88
Util::FixedArray< Math::mat4 > cascadeViewProjectionTransform
Definition csmutil.h:86
Util::FixedArray< Math::mat4 > cascadeProjectionTransform
Definition csmutil.h:86
const Graphics::GraphicsEntityId GetGlobalLight() const
gets the global light entity
Definition csmutil.h:133
Math::bbox shadowBox
Definition csmutil.h:80
virtual ~CSMUtil()
destructor
Definition csmutil.cc:40
const Util::FixedArray< Math::mat4 > & GetCascadeProjectionTransforms() const
returns raw pointer to array of cascade transforms
Definition csmutil.h:160
const Util::FixedArray< float > & GetCascadeDistances() const
returns raw pointer to array of cascade distances
Definition csmutil.h:169
void Compute(const Graphics::GraphicsEntityId camera, const Graphics::GraphicsEntityId light)
computes the splits
Definition csmutil.cc:100
void SetCameraEntity(const Graphics::GraphicsEntityId camera)
sets the camera entity
Definition csmutil.h:106
const Math::mat4 & GetCascadeViewProjection(IndexT cascadeIndex) const
gets computed view projection transform (valid after Compute)
Definition csmutil.h:142
CSMUtil(const uint numCascades)
constructor
Definition csmutil.cc:23
float cascadeMaxDistance
Definition csmutil.h:89
void SetShadowBox(const Math::bbox &sceneBox)
sets the scene bounding box
Definition csmutil.h:97
void SetFitTexels(bool state)
sets whether or not the CSM should clamp the cascades to fit the size of the texels
const Math::mat4 & GetCascadeCamera(IndexT index) const
gets cascade debug camera (only valid after Compute, and if the debug flag is set)
Graphics::GraphicsEntityId globalLight
Definition csmutil.h:82
void SetTextureWidth(int width)
sets the texture width for the CSM texture buffer
Nebula's bounding box class.
Definition bbox.h:24
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
The lighting subsystem allows for attaching light source functionality to a GraphicsEntityId.
Definition csmutil.cc:19
The graphics entity is only an Id, to which we can attach GraphicsContexts.
Definition graphicsentity.h:16
float rightSlope
Definition csmutil.h:72
float topSlope
Definition csmutil.h:74
float bottomSlope
Definition csmutil.h:75
float leftSlope
Definition csmutil.h:73
float nearPlane
Definition csmutil.h:76
float farPlane
Definition csmutil.h:76
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 4D vector.
Definition vec4.h:24
unsigned int uint
Definition types.h:31
int IndexT
Definition types.h:48