Skip to main content

LightGlobal

The LightGlobal class represents a global directional light source such as sunlight or moonlight. It includes a view angle parameter that controls the softness of shadows based on the distance between the shadow caster and receiver. This class also provides a comprehensive set of parameters for configuring Parallel-Split Shadow Map (PSSM) behavior to ensure constant shadow density across large scenes.

info

Ray-tracing based shadows are free of shadow-map related density and precision artifacts.

#include <scene/TellusimLightGlobal.h>

Inheritance

Constructors

explicit LightGlobal(const char *name = nullptr)
explicit LightGlobal(Scene &scene, const char *name = nullptr)

Methods

View angle value.

void setViewAngle(float32_t angle)
float32_t getViewAngle() const

Shadow range value.

void setShadowRange(float32_t range)
float32_t getShadowRange() const

Shadow depth value.

void setShadowMapDepth(float32_t depth)
float32_t getShadowMapDepth() const

Shadow map splits count.

void setShadowMapSplits(uint32_t splits)
uint32_t getShadowMapSplits() const

Shadow map split scale.

void setShadowMapSplitScale(float32_t scale)
float32_t getShadowMapSplitScale() const

Shadow map split power.

void setShadowMapSplitPower(float32_t power)
float32_t getShadowMapSplitPower() const

Shadow map split ratio.

void setShadowMapSplitRatio(float32_t ratio)
float32_t getShadowMapSplitRatio() const

Shadow map split offset.

void setShadowMapSplitOffset(float32_t offset)
float32_t getShadowMapSplitOffset() const