---
title: "init(name:channelEncoding:textureDimensions:turbidity:sunElevation:upperAtmosphereScattering:groundAlbedo:)"
framework: modelio
role: symbol
role_heading: Initializer
path: "modelio/mdlskycubetexture/init(name:channelencoding:texturedimensions:turbidity:sunelevation:upperatmospherescattering:groundalbedo:)"
---

# init(name:channelEncoding:textureDimensions:turbidity:sunElevation:upperAtmosphereScattering:groundAlbedo:)

Initializes a sky cube texture object with the specified parameters.

## Declaration

```swift
init(name: String?, channelEncoding: MDLTextureChannelEncoding, textureDimensions: vector_int2, turbidity: Float, sunElevation: Float, upperAtmosphereScattering: Float, groundAlbedo: Float)
```

## Parameters

- `name`: The doc://com.apple.modelio/documentation/ModelIO/MDLNamed/name property for the new texture object.
- `channelEncoding`: The data format for each channel value per texel—for example, 8-bit integer or 32-bit floating point. For possible values, see doc://com.apple.modelio/documentation/ModelIO/MDLTextureChannelEncoding.
- `textureDimensions`: The texel dimensions (width and height) of the texture image.
- `turbidity`: The cloudiness or haziness of the simulated sky. See the doc://com.apple.modelio/documentation/ModelIO/MDLSkyCubeTexture/turbidity property.
- `sunElevation`: The sun’s position in the simulated sky. See the doc://com.apple.modelio/documentation/ModelIO/MDLSkyCubeTexture/sunElevation property.
- `upperAtmosphereScattering`: A factor that influences the color of the simulated sky. See the doc://com.apple.modelio/documentation/ModelIO/MDLSkyCubeTexture/upperAtmosphereScattering property.
- `groundAlbedo`: A factor that influences the clarity of the simulated sky. See the doc://com.apple.modelio/documentation/ModelIO/MDLSkyCubeTexture/groundAlbedo property.

## Return Value

Return Value A new sky cube texture object.

## Discussion

Discussion The newly created texture is a cube texture; that is, its isCube property is true, and its dimensions property reflects the vertical layout of cube faces. This initializer does not generate texel data; the MDLSkyCubeTexture class automatically generates data and caches it for reuse when you use one of the MDLTexture methods listed in Accessing Texture Data.
