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

SortOrder

SortOrder

enum SortOrder : Enum<SortOrder>
Defines the rendering order for materials in a 3D scene.
Order is defined as:
  1. PreProcess
  2. Opaque
  3. Masked
  4. HolePunch
  5. Translucent
  6. PostProcess
Example usage:
// Set a material to render during the translucent pass
material.setSortOrder(SortOrder.TRANSLUCENT)

Entries

NameSummary
OPAQUE

For fully opaque materials that don’t require alpha blending. Rendered front-to-back for efficiency with depth testing.
MASKED

For materials with binary transparency (fully opaque or fully transparent pixels). No rendering order applied based on distance.
TRANSLUCENT

For materials with partial transparency that require alpha blending. Rendered back-to-front to ensure correct blending.
POSTPROCESS

For effects that are applied at the end of the rendering pipeline. No rendering order applied based on distance.
PREPROCESS

For effects that need to be applied at the beginning of the rendering pipeline. Rendered front-to-back. Rendered before all other objects (first in the rendering sequence).
HOLE_PUNCH

For materials that "punch holes" in the scene, typically used with layers. Rendered front-to-back.

Properties

NameSummary
name
val name: String
order
val order: Int

The numeric value representing the SortOrder type.
ordinal
val ordinal: Int

Functions

NameSummary
valueOf
fun valueOf(value: String): SortOrder

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<SortOrder>

Returns an array containing the constants of this enum type, in the order they’re declared.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon