<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LightmapResource/AtlasReference",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation16LightmapResourceC14AtlasReferenceV"
  },
  "title" : "LightmapResource.AtlasReference"
}
-->

# LightmapResource.AtlasReference

Specifies an area in a lightmap atlas
to fetch data from.

```
struct AtlasReference
```

## Topics

### Locating the atlas texture

[`var atlasTextureIndex: Int`](/documentation/RealityKit/LightmapResource/AtlasReference/atlasTextureIndex)

Index of the atlas within the LightmapResource.

[`var atlasTextureSlice: Int`](/documentation/RealityKit/LightmapResource/AtlasReference/atlasTextureSlice)

Index of the slice within the atlas.

### Mapping texture coordinates

[`var uvScale: SIMD2<Float>`](/documentation/RealityKit/LightmapResource/AtlasReference/uvScale)

A scale to apply to lightmap UV attribute before sampling
from the slice of the atlas.
Note that lightmap textures use the Metal convention: UV (0,0) corresponds
to the top-left corner of the image, while UV (1,1) corresponds to the bottom-right.

[`var uvOffset: SIMD2<Float>`](/documentation/RealityKit/LightmapResource/AtlasReference/uvOffset)

An offset to apply to lightmap UV attribute before sampling
from the slice of the atlas.
Note that lightmap textures use the Metal convention: UV (0,0) corresponds
to the top-left corner of the image, while UV (1,1) corresponds to the bottom-right.

### Initializers

[`init()`](/documentation/RealityKit/LightmapResource/AtlasReference/init())

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)