API reference
API reference
Select your platform
No SDKs available
No versions available

AlphaMode

AlphaMode

enum AlphaMode : Enum<AlphaMode>
Enum class representing the alpha modes for rendering.
This enum defines how the alpha channel of a texture or color is interpreted and applied during rendering.

Entries

NameSummary
OPAQUE

The material is completely opaque and doesn’t use the alpha channel. This means that the alpha value is ignored, and the material is rendered as fully opaque.
TRANSLUCENT

This mode uses the alpha channel to blend the material with the background, but doesn’t write to the depth buffer. As a result, it is rendered last to ensure correct blending.
MASKED

In this mode, the alpha channel is used to decide whether a pixel is completely opaque or transparent.
ADDITIVE

This mode adds the RGBA channels together. Note that additive materials don’t write to the depth buffer.
NONE

The material is completely transparent and doesn’t affect the rendering output.
TRANSLUCENT_POST

The material is completely transparent and renders the material late in the render process.

Types

NameSummary
Companion
object Companion

Properties

NameSummary
mode
val mode: Int
name
val name: String
ordinal
val ordinal: Int

Functions

NameSummary
valueOf
fun valueOf(value: String): AlphaMode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
values
fun values(): Array<AlphaMode>

Returns an array containing the constants of this enum type, in the order they’re declared.

Companion

object Companion

Functions

NameSummary
fromInt
fun fromInt(mode: Int): AlphaMode

Returns the alpha mode corresponding to the given integer value.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon