Class

MDLSkyCubeTexture

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

Declaration

class MDLSkyCubeTexture : MDLTexture

Overview

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

Topics

Working with Sky Simulation Parameters

var turbidity: Float

The cloudiness or haziness of the simulated sky.

var sunElevation: Float

The sun’s position in the simulated sky.

var upperAtmosphereScattering: Float

A factor that influences the color of the simulated sky.

var groundAlbedo: Float

A factor that influences the clarity of the simulated sky.

var groundColor: CGColor?

The color of the simulated ground.

var horizonElevation: Float

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

Working with Tone Mapping Parameters

var gamma: Float

The amount of gamma correction to apply during tone mapping.

var exposure: Float

The amount of exposure compensation to apply during tone mapping.

var brightness: Float

The amount of brightness enhancement to apply during tone mapping.

var contrast: Float

The amount of contrast enhancement to apply during tone mapping.

var saturation: Float

The amount of saturation enhancement to apply during tone mapping.

var highDynamicRangeCompression: vector_float2

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

Updating Texture Data

func update()

Generates new texel data matching the current sky parameters.

Instance Properties

Relationships

Inherits From

Conforms To

See Also

Textures

class MDLTexture

A source of texel data to be used in rendering material surface appearances.

class MDLCheckerboardTexture

A generator of texel data that creates a checkerboard pattern with two specified colors.

class MDLColorSwatchTexture

A generator of texel data that creates a gradient between two specified colors.

class MDLNoiseTexture

A generator of texel data that creates a field of random noise.

class MDLNormalMapTexture

A generator of texel data that computes a normal map from a supplied texture.

class MDLURLTexture

A lightweight reference to a URL from which to load texture data.

class MDLTextureFilter

A description of filtering modes for a renderer to use when sampling from a texture.

class MDLTextureSampler

An object that pairs a source of texture data with sampling parameters to be used in rendering the texture.