---
title: "SpatialExternalSurfaceSphere"
description: "A Composable that creates and owns an Android Surface into which the application can render stereo image content inside a 360 degree sphere dome."
type: "composable"
lastmod: "2026-05-08T01:17:01.375127Z"
---
## API Reference

### SpatialExternalSurfaceSphere

> Source set: Android

```kotlin
@Composable
@SubspaceComposable
public fun SpatialExternalSurfaceSphere(
    stereoMode: StereoMode,
    modifier: SubspaceModifier = SubspaceModifier,
    radius: Dp = SpatialExternalSurfaceDefaults.sphereRadius,
    featheringEffect: SpatialFeatheringEffect? = null,
    surfaceProtection: SpatialExternalSurfaceProtection = SpatialExternalSurfaceProtection.None,
    interactionPolicy: InteractionPolicy? = null,
    superSamplingPattern: SuperSamplingPattern = SuperSamplingPattern.Pentagon,
    onSurface: SpatialExternalSurfaceScope.() -> Unit,
)
```

A Composable that creates and owns an Android Surface into which the application can render
stereo image content inside a 360 degree sphere dome. This Surface is then texture mapped to the
canvas, and if a stereoscopic StereoMode is specified, then the User will see left and right eye
content mapped to the appropriate display. This surface currently cannot be used for rendering
still images.

This Composable orients itself to match the parent Pose. Unlike [SpatialExternalSurface](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialExternalSurface), due to
this Composable's close resemblance to the system environment, this Composable has no layout size
when inserted into rows and columns, and Composables can't be positioned relative to its edges,
or as its children. While this Composable is active, a temporary preferred environment will be
set, if one isn't already set, to put the user inside a boundary. In cases where the user has not
consented to the boundary or if passthrough is ever fully enabled, a transparent feathered
surface will display instead.

It is not currently possible to synchronize StereoMode changes with application rendering or
video decoding.

Playing certain content will require the proper [SpatialExternalSurfaceProtection](/jetpack-compose/androidx.xr.compose/compose/classes/SpatialExternalSurfaceProtection). This is
mainly used to protect DRM video content.

#### Parameters

| | |
| --- | --- |
| modifier | SubspaceModifiers to apply to the sphere. A sphere's measured size is automatically inferred from `radius` and does not need to be set through a modifier. |
| stereoMode | The [StereoMode](/jetpack-compose/androidx.xr.compose/compose/classes/StereoMode) which describes how parts of the surface are displayed to the user's eyes. This will affect how the content is interpreted and displayed on the surface. |
| radius | The radius of the dome displaying the video. |
| featheringEffect | A [SpatialFeatheringEffect](/jetpack-compose/androidx.xr.compose/compose/classes/SpatialFeatheringEffect) to apply to the canvas of the surface exposed from [SpatialExternalSurfaceScope.onSurfaceCreated](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialExternalSurfaceScope). For sphere domes, vertical feathering applies to the top and bottom poles of the dome, while horizontal feathering applies to the left and right sides where the video is stitched together. |
| surfaceProtection | Sets the Surface's content protection. Use this to redact content in screen recordings. Setting this to `SpatialExternalSurfaceProtection.Protected` is required if decoding DRM media content. |
| interactionPolicy | An optional [InteractionPolicy](/jetpack-compose/androidx.xr.compose/compose/classes/InteractionPolicy) that can be set to detect input events. |
| superSamplingPattern | The pattern to use to super sample this surface, or `SuperSamplingPattern.None` to disable super sampling. |
| onSurface | Lambda invoked when the surface is created through [SpatialExternalSurfaceScope.onSurfaceCreated](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialExternalSurfaceScope) and destroyed through [SpatialExternalSurfaceScope.onSurfaceDestroyed](/jetpack-compose/androidx.xr.compose/compose/interfaces/SpatialExternalSurfaceScope). |
