Texture LightCookie { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The LightCookie property of the SceneLight class provides access to a texture that is applied over the light. This texture, known as a light cookie, can be used to create various lighting effects by modulating the light's appearance, such as simulating shadows or patterns projected by the light source.

Usage

To use the LightCookie property, you can assign a Texture object to it. This texture will then be used as the light cookie for the SceneLight instance, affecting how the light is rendered in the scene.

Example

// Create a new SceneLight
SceneLight myLight = new SceneLight();

// Load a texture to use as a light cookie
Texture cookieTexture = Texture.Load("path/to/texture.png");

// Assign the texture to the LightCookie property
myLight.LightCookie = cookieTexture;

// Now the light will use the specified texture as a cookie, affecting its appearance in the scene.