CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShadowSettings Struct Referencefinal

Various options that control shadow rendering for a specific view. More...

#include <CeresEngine/Scene/Scene.hpp>

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Public Attributes

double directionalShadowDistance = 250.0
 Maximum distance that directional light shadows are allowed to render at.
 
UInt32 numberOfCascades = 4
 Number of cascades to use for directional shadows.
 
double cascadeDistributionExponent = 3.0f
 Allows you to control how are directional shadow cascades distributed.
 
UInt32 shadowFilteringQuality = 4
 Determines the number of samples used for percentage closer shadow map filtering.
 

Detailed Description

Various options that control shadow rendering for a specific view.

Member Function Documentation

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::ShadowSettings::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Member Data Documentation

◆ cascadeDistributionExponent

double CeresEngine::ShadowSettings::cascadeDistributionExponent = 3.0f

Allows you to control how are directional shadow cascades distributed.

Value of 1 means the cascades will be linearly split, each cascade taking up the same amount of space. Value of 2 means each subsequent split will be twice the size of the previous one (meaning cascades closer to the viewer cover a smaller area, and therefore yield higher resolution shadows). Higher values increase the size disparity between near and far cascades at an exponential rate. Valid range is roughly [1, 4].

◆ directionalShadowDistance

double CeresEngine::ShadowSettings::directionalShadowDistance = 250.0

Maximum distance that directional light shadows are allowed to render at.

Decreasing the distance can yield higher quality shadows nearer to the viewer, as the shadow map resolution isn't being used up on far away portions of the scene. In world units (meters).

◆ numberOfCascades

UInt32 CeresEngine::ShadowSettings::numberOfCascades = 4

Number of cascades to use for directional shadows.

Higher number of cascades increases shadow quality as each individual cascade has less area to cover, but can significantly increase performance cost, as well as a minor increase in memory cost. Valid range is roughly [1, 6].

◆ shadowFilteringQuality

UInt32 CeresEngine::ShadowSettings::shadowFilteringQuality = 4

Determines the number of samples used for percentage closer shadow map filtering.

Higher values yield higher quality shadows, at the cost of performance. Valid range is [1, 4].


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