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

PanelRenderMode Class

Sealed class defining how the panel will render in the scene.

Signature

sealed class PanelRenderMode

Inner Classes

Mesh Class

Modifiers: final
Use a simple mesh-based panel. This is not a good option for panels with text or complex UI as it will appear low-resolution.

Signature

class Mesh : PanelRenderMode

Constructors

Mesh ()
Signature
constructor()
Returns
PanelRenderMode.Mesh

Layer Class

Modifiers: final
Layers enable sharp, crisp panels that look great to the user. This is the recommended approach for most panels as the benefits outweigh the costs.

Signature

data class Layer(val layerBlendType: PanelShapeLayerBlendType = PanelShapeLayerBlendType.MASKED, val enableLayerFeatheredEdge: Boolean = false, val filters: Int? = null) : PanelRenderMode

Constructors

Layer ( layerBlendType , enableLayerFeatheredEdge , filters )
Signature
constructor(layerBlendType: PanelShapeLayerBlendType = PanelShapeLayerBlendType.MASKED, enableLayerFeatheredEdge: Boolean = false, filters: Int? = null)
Parameters
layerBlendType: PanelShapeLayerBlendType
  This parameter determins the type of blending applied to the layer. OPAQUE: Every pixel of the panel is rendered to the screen, and the alpha value of the underlying texture is ignored. MASKED: The default type, where each sample is either rendered or discarded based on the alpha value of the panel. ALPHA_BLEND: The alpha is blended accurately, resulting in higher quality edges. However, it is slower and can result in blending artifacts when overlapping with semitransparent meshes.
enableLayerFeatheredEdge: Boolean
  If true, it uses a special shader that feathers the edges of the panel, as well as edges around the alpha edges in the texture. It slightly shrinks the size of the panel and works best when the layerBlendType is set to ALPHA_BLEND.
filters: Int?
  Optional layer filters using LayerFilters constants. If null, uses the LayerConfig default filtering. In most cases supplying DEFAULT_QUALITY or HIGHEST_QUALITY should be sufficient. For more fine-grained control you can combine filters with bitwise OR operations.
Returns
PanelRenderMode.Layer

Properties

enableLayerFeatheredEdge : Boolean
[Get]
If true, it uses a special shader that feathers the edges of the panel, as well as edges around the alpha edges in the texture. It slightly shrinks the size of the panel and works best when the layerBlendType is set to ALPHA_BLEND.
Signature
val enableLayerFeatheredEdge: Boolean = false
filters : Int?
[Get]
Optional layer filters using LayerFilters constants. If null, uses the LayerConfig default filtering. In most cases supplying DEFAULT_QUALITY or HIGHEST_QUALITY should be sufficient. For more fine-grained control you can combine filters with bitwise OR operations.
Signature
val filters: Int? = null
layerBlendType : PanelShapeLayerBlendType
[Get]
This parameter determins the type of blending applied to the layer. OPAQUE: Every pixel of the panel is rendered to the screen, and the alpha value of the underlying texture is ignored. MASKED: The default type, where each sample is either rendered or discarded based on the alpha value of the panel. ALPHA_BLEND: The alpha is blended accurately, resulting in higher quality edges. However, it is slower and can result in blending artifacts when overlapping with semitransparent meshes.
Signature
val layerBlendType: PanelShapeLayerBlendType
Did you find this page helpful?