Shadow structure (Legacy)
- Last UpdatedApr 02, 2025
- 2 minute read
The ShadowParams structure contains the parameters relative to the shadows functionalities.
Code example
This is a code example for Shadow structure.
$ShadowParams
{
bOneShadowPerObject = false
bNoDistanceTest = false
iRefreshFrameRate = 10
bExcludeMeshes = false
bExcludeHumans = false
bRefreshOnHumans = false
fAttenuation = 1
}
Parameters
bOneShadowPerObject
-
When True, every object (Mesh, Human) that falls within the Light frustum generates a unique Shadow Map.
-
When False, the Light generates a single Shadow Map for all the objects.
-
Default: False.
-
Range: True or False.
Note: Omni Lights behavior differs. When True, 1 Shadow Map per object; when False, 6 Shadow Maps total.
bNoDistanceTest
-
When True, the application of the shadow on the final pixel does not account for the Lights' attenuation value. The Light appears to casts an infinite, long shadow.
-
This parameter is not used when calculating the visibility of the objects. Meshes outside the Light's frustum are not rendered.
-
Default: False.
-
Range: True or False.
Note: This parameter is not used in FGI.
iRefreshFrameRate
-
Specifies how many time per second the Shadow Map is generated
-
refreshFrameRate= -1 à generated every frame.
-
refreshFrameRate= 0 à generated only once.
-
refreshFrameRate= n à generated n times per second. For example: 5 à means five times each second.
-
refreshFrameRate= -10 à generated every frame (textureRefreshMultiplier is not considered)
-
-
Default: -1.
-
Range: [-inf..inf]
bExcludeMeshes
-
When True, mesh objects are not rendered inside the Shadow Map.
-
Default: False.
-
Range: True or False.
bExcludeHumans
-
When True, human objects are not rendered inside the Shadow Map.
-
Default: False.
-
Range: True or False.
bRefreshOnHumans
-
When True, the Shadow Map is regenerated if any Human object intersects the Light boundings.
-
It works only when the Shadow Map refresh rate is 0, otherwise the Shadow Map is updated at the specified frame rate specified.
-
Default: False.
-
Range: True or False.
fAttenuation
-
Specifies how much the shadow mimics the Light attenuation algorithm.
-
0 à no attenuation (hard shadow)
-
1 à full attenuation (soft shadow)
-
Default: 0.5
-
Range: [0..1]
Note: This parameter is not used in DofHdrB.