Click or drag to resize

TranslucencyHelperAlphaToTranslucency Method

Converts an alpha value to a translucency value. When the alpha is 255 or greater, the translucency is 0.0f. When the alpha is 0 or less, the translucency is 1.0f. When the alpha is in between these values, the translucency is linearly ramped between 0.0f and 1.0f accordingly.

Namespace:  AGI.Foundation.Graphics.Advanced
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 22.2.414.0 (22.2.414.0)
Syntax
public static float AlphaToTranslucency(
	int alpha
)

Parameters

alpha
Type: SystemInt32
The alpha value to convert to a translucency.

Return Value

Type: Single
The translucency value.
See Also