<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImmersiveMediaSupport",
  "identifier" : "/documentation/ImmersiveMediaSupport/ImmersiveCameraLensDefinition/generateSTMap(device:cameraEye:stmapType:into:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Immersive Media Support"
    ],
    "preciseIdentifier" : "s:21ImmersiveMediaSupport0A20CameraLensDefinitionV13generateSTMap6device9cameraEye9stmapType4intoySo9MTLDevice_p_AC0K0OAC0hM0OSo10MTLTexture_ptYaKF"
  },
  "title" : "generateSTMap(device:cameraEye:stmapType:into:)"
}
-->

# generateSTMap(device:cameraEye:stmapType:into:)

Generates an STMap for the given projection type and for the given camera eye into the provided texture asynchronously.

```
func generateSTMap(device: any MTLDevice, cameraEye: ImmersiveCameraLensDefinition.Eye, stmapType: ImmersiveCameraLensDefinition.STMapType, into texture: any MTLTexture) async throws
```

## Parameters

`device`

The metal device to use during the STMap generation.

`cameraEye`

The camera side to use for generating the STMap.

`stmapType`

The type of STMap output: Equirectangular or Equidistant are the current options.

`texture`

The output texture where the STMap will be stored.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)