Description
The ShadowTextureResolution
property of the SceneLight
class allows you to get or set the resolution of the shadow map used by the light. This property is an integer value representing the resolution in pixels. If the value is set to zero, the engine will automatically determine an appropriate resolution based on the current context and performance considerations.
Usage
To use the ShadowTextureResolution
property, you can simply access it through an instance of the SceneLight
class. You can assign a specific resolution to control the quality and performance of the shadows cast by the light. Setting it to zero lets the engine decide the best resolution.
Example
// Create a new SceneLight instance
SceneLight myLight = new SceneLight();
// Set the shadow texture resolution to 1024
myLight.ShadowTextureResolution = 1024;
// Alternatively, let the engine decide the resolution
myLight.ShadowTextureResolution = 0;
// Retrieve the current shadow texture resolution
int currentResolution = myLight.ShadowTextureResolution;