<h2 id="spatialexternalsurface360sphere-stereomode-modifier-radius-featheringeffect-surfaceprotection-interactionpolicy-supersamplingpattern-onsurface">SpatialExternalSurface360Sphere</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@Composable
@SubspaceComposable
public fun SpatialExternalSurface360Sphere(
    stereoMode: StereoMode,
    modifier: SubspaceModifier = SubspaceModifier,
    radius: Dp = SpatialExternalSurfaceDefaults.sphereRadius,
    featheringEffect: SpatialFeatheringEffect? = null,
    surfaceProtection: SurfaceProtection = SurfaceProtection.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 Composable orients itself to match the parent Pose and has no layout size. 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 [SurfaceProtection](/jetpack-compose/androidx.xr.compose/compose/classes/SurfaceProtection). 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 to 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 `SurfaceProtection.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). |