<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLSkyCubeTexture",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLSkyCubeTexture"
  },
  "title" : "MDLSkyCubeTexture"
}
-->

# MDLSkyCubeTexture

A generator of texel data that creates cube textures using a physically realistic simulation of the sunlit sky.

```
class MDLSkyCubeTexture
```

## Overview

The sky textures generated by this class can can be useful as environment maps or light probes in rendering. Like other procedural [`MDLTexture`](/documentation/ModelIO/MDLTexture) subclasses, the [`MDLSkyCubeTexture`](/documentation/ModelIO/MDLSkyCubeTexture) class generates texel data only when that data is first referenced, and then caches it for future use.

## Topics

### Creating a Sky Cube Texture

[`-  initWithName:channelEncoding:textureDimensions:turbidity:sunElevation:upperAtmosphereScattering:groundAlbedo:`](/documentation/ModelIO/MDLSkyCubeTexture/init(name:channelEncoding:textureDimensions:turbidity:sunElevation:upperAtmosphereScattering:groundAlbedo:))

Initializes a sky cube texture object with the specified parameters.

### Working with Sky Simulation Parameters

[`turbidity`](/documentation/ModelIO/MDLSkyCubeTexture/turbidity)

The cloudiness or haziness of the simulated sky.

[`sunElevation`](/documentation/ModelIO/MDLSkyCubeTexture/sunElevation)

The sun’s position in the simulated sky.

[`upperAtmosphereScattering`](/documentation/ModelIO/MDLSkyCubeTexture/upperAtmosphereScattering)

A factor that influences the color of the simulated sky.

[`groundAlbedo`](/documentation/ModelIO/MDLSkyCubeTexture/groundAlbedo)

A factor that influences the clarity of the simulated sky.

[`groundColor`](/documentation/ModelIO/MDLSkyCubeTexture/groundColor)

The color of the simulated ground.

[`horizonElevation`](/documentation/ModelIO/MDLSkyCubeTexture/horizonElevation)

The angle, in radians relative to center, below which to render the ground color.

### Working with Tone Mapping Parameters

[`gamma`](/documentation/ModelIO/MDLSkyCubeTexture/gamma)

The amount of gamma correction to apply during tone mapping.

[`exposure`](/documentation/ModelIO/MDLSkyCubeTexture/exposure)

The amount of exposure compensation to apply during tone mapping.

[`brightness`](/documentation/ModelIO/MDLSkyCubeTexture/brightness)

The amount of brightness enhancement to apply during tone mapping.

[`contrast`](/documentation/ModelIO/MDLSkyCubeTexture/contrast)

The amount of contrast enhancement to apply during tone mapping.

[`saturation`](/documentation/ModelIO/MDLSkyCubeTexture/saturation)

The amount of saturation enhancement to apply during tone mapping.

[`highDynamicRangeCompression`](/documentation/ModelIO/MDLSkyCubeTexture/highDynamicRangeCompression)

Two parameters that determine the brightness compression curve for colors in the texture image.

### Updating Texture Data

[`-  updateTexture`](/documentation/ModelIO/MDLSkyCubeTexture/update())

Generates new texel data matching the current sky parameters.

## Relationships

### Conforms To

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`MDLNamed`](/documentation/ModelIO/MDLNamed)

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

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

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

### Inherits From

[`MDLTexture`](/documentation/ModelIO/MDLTexture)

---

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)