Instance Method

initWithReflectiveTexture:irradianceTexture:

Initializes a light probe with the specified cube map textures.

Declaration

- (instancetype)initWithReflectiveTexture:(MDLTexture *)reflectiveTexture irradianceTexture:(MDLTexture *)irradianceTexture;

Parameters

reflectiveTexture

A cube map texture that contains a rendering of a scene as seen from the light probe’s position.

irradianceTexture

A cube map texture that contains samples of the total light arriving at the light probe’s position from every direction.

Return Value

A new light probe object.

Discussion

You can derive an irradiance map from a reflective texture with methods on the MDLTexture class, or when creating a light probe with the lightProbeWithTextureSize:forLocation:lightsToConsider:objectsToConsider:reflectiveCubemap:irradianceCubemap: method.