

PanelConfigOptions forms, and troubleshooting. MASKED is the default for UIPanelSettings.OPAQUE, MASKED, then ALPHA_BLEND.| Mode | Result without feathering |
|---|---|
OPAQUE | Every pixel renders and the alpha value is ignored, so the corners are solid |
MASKED | Each sample either renders or does not, so the corners are cut out and the edges are aliased |
ALPHA_BLEND | The corners fade smoothly. This mode does not write to the depth buffer, so alpha blended geometry can appear in the wrong order |



PanelShapeLayerBlendType.OPAQUE
OPAQUE mode, the edges of the panel are shrunk slightly with a soft feathered edge. However, the alpha value of the texture is ignored, and all texels are treated as opaque, except for the feathering on the borders.PanelShapeLayerBlendType.MASKED
PanelShapeLayerBlendType.ALPHA_BLEND
ALPHA_BLEND with feathering. In addition to feathering the edges, it will analyze the alpha of the interior of the texture and apply a smooth blend to the transition. This also provides increased quality for alpha blend edges.renderMode to PanelRenderMode.Layer() in your panel render options:// UI panels with layers
UIPanelSettings(
rendering = UIPanelRenderOptions(
renderMode = PanelRenderMode.Layer() // Default - enables layers
)
)
// UI panels with mesh rendering
UIPanelSettings(
rendering = UIPanelRenderOptions(
renderMode = PanelRenderMode.Mesh() // Use mesh instead of layers
)
)
ReadableMediaPanelRenderOptions with PanelRenderMode.Mesh() incorrectly creates a compositor layer. See Known issues for details and workarounds.VideoSurfacePanelRegistration: Uses direct-to-surface rendering, only available with layersReadableVideoSurfacePanelRegistration: Supports both layer and mesh rendering modes as shown abovePanelConfigOptions for layer configurationPanelConfigOptions:import com.meta.spatial.runtime.LayerConfig
PanelConfigOptions().apply {
// Enable layers
layerConfig = LayerConfig()
// Or disable layers (use mesh rendering)
layerConfig = null
// Advanced layer configuration with hole punching
layerConfig = LayerConfig(filters = LayerFilters.HIGHEST_QUALITY, zIndex = -1)
layerBlendType = PanelShapeLayerBlendType.ALPHA_BLEND
enableLayerFeatheredEdge = true
alphaMode = AlphaMode.HOLE_PUNCH
panelShader = SceneMaterial.HOLE_PUNCH_PANEL_SHADER
}
layerConfig from your configuration along with the panelShader and alphaMode changes.