bool EnableDirectLighting { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The EnableDirectLighting property of the SceneCamera class allows you to enable or disable direct lighting in the scene. Direct lighting refers to the light that travels directly from a light source to a surface without being scattered or reflected by other surfaces. This property is useful for controlling the lighting effects in your scene, particularly when you want to achieve specific visual outcomes or optimize performance by toggling lighting features.

Usage

To use the EnableDirectLighting property, simply set it to true to enable direct lighting or false to disable it. This can be done at any point in your code where you have access to a SceneCamera instance.

Example

// Example of enabling direct lighting on a SceneCamera instance
SceneCamera camera = new SceneCamera();
camera.EnableDirectLighting = true; // Enable direct lighting

// Example of disabling direct lighting
camera.EnableDirectLighting = false; // Disable direct lighting