What's New / Graphics & Metal

What's new in MetalFX

+31 New~2 DeprecatediOS · macOS · tvOS · visionOS

MetalFX provides Metal-based upscaling and frame interpolation. Renderers draw at a lower resolution, then reconstruct higher-resolution or intermediate frames using spatial, temporal, and denoised scalers and a frame interpolator.

31 new APIs, 2 deprecations, no removals. Most additions land on MTLFXFrameInterpolatorBase, which gains content sizing and offset properties: contentWidth, contentHeight, depthContentOffsetX/Y, motionContentOffsetX/Y, outputOffsetX/Y, plus the flags isDistortionTextureEnabled and requiresPrevColorTexture. The deprecations are reactiveTextureUsage on MTLFXTemporalDenoisedScalerBase and MTLFXTemporalScalerBase.

New

31
var

isDistortionTextureEnabled

NewiOSmacOStvOS
open var isDistortionTextureEnabled: Bool

A Boolean value that indicates whether the frame interpolator supports barrel distortion correction.

Set this property to <doc://com.apple.documentation/documentation/swift/true> to create a frame interpolator that can apply barrel distortion correction using a distortion field texture.

When you enable this property, you can assign a distortion texture to the interpolator's distortionTexture property to correct lens distortion artifacts during frame interpolation.

This property's default value is <doc://com.apple.documentation/documentation/swift/false>.

var

isJitteredMotionVectorsEnabled

NewiOSmacOStvOS
open var isJitteredMotionVectorsEnabled: Bool

A Boolean value that indicates whether the motion vectors include the jittering pattern.

When you set this property to <doc://com.apple.documentation/documentation/swift/true>, the scaler internally subtracts the jitter from the motion vectors using the jitter offset values provided each frame via jitterOffsetX and jitterOffsetY.

When <doc://com.apple.documentation/documentation/swift/false> (the default), the scaler uses the motion vectors directly without any adjustment.

var

isOutputResolutionMotionVectorsEnabled

NewiOSmacOStvOS
open var isOutputResolutionMotionVectorsEnabled: Bool

A Boolean value that indicates whether the scaler expects motion vectors at output resolution.

Set this property to <doc://com.apple.documentation/documentation/swift/true> when your app provides motion vectors at the output resolution rather than the input resolution.

When you enable this property, the scaler interprets the motionTexture dimensions to match outputWidth and outputHeight instead of inputWidth and inputHeight.

This property's default value is <doc://com.apple.documentation/documentation/swift/false>.

var

requiresPrevColorTexture

NewiOSmacOStvOS
open var requiresPrevColorTexture: Bool

A Boolean value that indicates whether the frame interpolator requires the client to provide a previous color texture.

When this property is YES (the default), you must assign a valid texture to the interpolator's prevColorTexture property before encoding. When NO, the frame interpolator internally manages the previous color data and prevColorTexture may be nil.

This property's default value is <doc://com.apple.documentation/documentation/swift/true>.

var

MTLFXFrameInterpolatorBase.contentHeight

NewiOSmacOStvOS
var contentHeight: Int { get set }

The height, in pixels, of the content region within the input textures to process.

Use this property together with contentWidth to specify a subrectangle of the input textures for the frame interpolator to process.

var

MTLFXFrameInterpolatorBase.contentWidth

NewiOSmacOStvOS
var contentWidth: Int { get set }

The width, in pixels, of the content region within the input textures to process.

Use this property together with contentHeight to specify a subrectangle of the input textures for the frame interpolator to process.

var

MTLFXFrameInterpolatorBase.depthContentOffsetX

NewiOSmacOStvOS
var depthContentOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the depth texture to use as input.

var

MTLFXFrameInterpolatorBase.depthContentOffsetY

NewiOSmacOStvOS
var depthContentOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the depth texture to use as input.

var

MTLFXFrameInterpolatorBase.distortionHeight

NewiOSmacOStvOS
var distortionHeight: Int { get set }

The height, in pixels, of the content region within the distortion texture to use as input.

When set to zero (the default), the frame interpolator uses contentHeight instead.

var

MTLFXFrameInterpolatorBase.distortionOffsetX

NewiOSmacOStvOS
var distortionOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the distortion texture to use as input.

var

MTLFXFrameInterpolatorBase.distortionOffsetY

NewiOSmacOStvOS
var distortionOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the distortion texture to use as input.

var

MTLFXFrameInterpolatorBase.distortionTexture

NewiOSmacOStvOS
var distortionTexture: (any MTLTexture)? { get set }

A distortion field texture that the frame interpolator uses to correct barrel distortion.

Assign a texture containing a distortion field to this property to enable barrel distortion correction during frame interpolation. The distortion field describes how to remap pixels to correct lens distortion artifacts common in VR or wide-angle camera applications.

You are responsible for providing a texture that matches the output dimensions of the frame interpolator.

var

MTLFXFrameInterpolatorBase.distortionWidth

NewiOSmacOStvOS
var distortionWidth: Int { get set }

The width, in pixels, of the content region within the distortion texture to use as input.

When set to zero (the default), the frame interpolator uses contentWidth instead.

var

MTLFXFrameInterpolatorBase.motionContentOffsetX

NewiOSmacOStvOS
var motionContentOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the motion texture to use as input.

var

MTLFXFrameInterpolatorBase.motionContentOffsetY

NewiOSmacOStvOS
var motionContentOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the motion texture to use as input.

var

MTLFXFrameInterpolatorBase.outputOffsetX

NewiOSmacOStvOS
var outputOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the output texture to write results.

var

MTLFXFrameInterpolatorBase.outputOffsetY

NewiOSmacOStvOS
var outputOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the output texture to write results.

var

MTLFXFrameInterpolatorBase.viewToClipMatrix

NewiOSmacOStvOS
var viewToClipMatrix: simd_float4x4 { get set }

The view-to-clip coordinates transformation matrix this frame interpolator uses as part of its operation.

var

MTLFXFrameInterpolatorBase.worldToViewMatrix

NewiOSmacOStvOS
var worldToViewMatrix: simd_float4x4 { get set }

The world-to-view transformation matrix this frame interpolator uses as part of its operation.

var

MTLFXTemporalDenoisedScalerBase.reactiveMaskTextureUsage

NewiOSmacOStvOS
var reactiveMaskTextureUsage: MTLTextureUsage { get }

The minimal texture usage options that your app's input reactive mask texture needs in order to support this denoiser scaler.

var

MTLFXTemporalScalerBase.colorContentOffsetX

NewiOSmacOStvOS
var colorContentOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the color texture to use as input.

var

MTLFXTemporalScalerBase.colorContentOffsetY

NewiOSmacOStvOS
var colorContentOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the color texture to use as input.

var

MTLFXTemporalScalerBase.depthContentOffsetX

NewiOSmacOStvOS
var depthContentOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the depth texture to use as input.

var

MTLFXTemporalScalerBase.depthContentOffsetY

NewiOSmacOStvOS
var depthContentOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the depth texture to use as input.

var

MTLFXTemporalScalerBase.motionContentOffsetX

NewiOSmacOStvOS
var motionContentOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the motion texture to use as input.

var

MTLFXTemporalScalerBase.motionContentOffsetY

NewiOSmacOStvOS
var motionContentOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the motion texture to use as input.

var

MTLFXTemporalScalerBase.outputOffsetX

NewiOSmacOStvOS
var outputOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the output texture to write results.

var

MTLFXTemporalScalerBase.outputOffsetY

NewiOSmacOStvOS
var outputOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the output texture to write results.

var

MTLFXTemporalScalerBase.reactiveMaskContentOffsetX

NewiOSmacOStvOS
var reactiveMaskContentOffsetX: Int { get set }

The horizontal offset, in pixels, of the region within the reactive mask texture to use as input.

var

MTLFXTemporalScalerBase.reactiveMaskContentOffsetY

NewiOSmacOStvOS
var reactiveMaskContentOffsetY: Int { get set }

The vertical offset, in pixels, of the region within the reactive mask texture to use as input.

var

MTLFXTemporalScalerBase.reactiveMaskTextureUsage

NewiOSmacOStvOS
var reactiveMaskTextureUsage: MTLTextureUsage { get }

The minimal texture usage options that your app's reactive mask texture needs in order to support this scaler.

Deprecated

2
var

MTLFXTemporalDenoisedScalerBase.reactiveTextureUsage

DeprecatediOSmacOStvOS
var reactiveTextureUsage: MTLTextureUsage { get }

The minimal texture usage options that your app's input reactive texture needs in order to support this denoiser scaler.

var

MTLFXTemporalScalerBase.reactiveTextureUsage

DeprecatediOSmacOStvOSvisionOS
var reactiveTextureUsage: MTLTextureUsage { get }

The minimal texture usage options that your app's reactive texture needs in order to support this scaler.

No APIs match your filter.

← More in Graphics & Metal