---
title: "mip(slices:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/textureresource/contents/mipmaplevel/mip(slices:)"
---

# mip(slices:)

Specifies a single mipmap level of a 2D or 3D texture resource that slices provide.

## Declaration

```swift
static func mip(slices: [TextureResource.Contents.Slice]) -> TextureResource.Contents.MipmapLevel
```

## Parameters

- `slices`: The source slices. A 2D array texture requires one slice per arrayLength. A cube texture requires six slices, containing faces [+X, -X, +Y, -Y, +Z, -Z]. 2D and 3D textures need a single slice, and you can build their MipmapLevel with mip(buffer:offset:size:bytesPerRow:) or mip(data:bytesPerRow).

## See Also

### Creating a texture mipmap level

- [mip(data:bytesPerRow:)](realitykit/textureresource/contents/mipmaplevel/mip(data:bytesperrow:).md)
- [mip(data:bytesPerRow:bytesPerImage:)](realitykit/textureresource/contents/mipmaplevel/mip(data:bytesperrow:bytesperimage:).md)
- [mip(unsafeBuffer:offset:size:bytesPerRow:)](realitykit/textureresource/contents/mipmaplevel/mip(unsafebuffer:offset:size:bytesperrow:).md)
- [mip(unsafeBuffer:offset:size:bytesPerRow:bytesPerImage:)](realitykit/textureresource/contents/mipmaplevel/mip(unsafebuffer:offset:size:bytesperrow:bytesperimage:).md)
