Description
The Lighten
field is a member of the BlendMode
enumeration within the Sandbox namespace. It represents a blend mode used in the UI system where the resulting color is determined by comparing the source and destination colors and selecting the lighter of the two. This blend mode is useful for achieving effects where you want to ensure that the resulting color is never darker than either of the input colors.
Usage
To use the Lighten
blend mode, you can assign it to a property or method that accepts a BlendMode
parameter. This is typically used in rendering contexts where you want to control how two layers are composited together.
Example
// Example of using BlendMode.Lighten in a UI component
public class MyUIComponent : Component
{
public void ApplyBlendMode()
{
// Assuming 'material' is a UI material that supports blend modes
material.BlendMode = BlendMode.Lighten;
}
}