Contents

requiresSynchronousInitialization

A Boolean value that indicates whether MetalFX compiles a temporal scaling effect’s underlying upscaler as it creates the instance.

Declaration

var requiresSynchronousInitialization: Bool { get set }

Overview

This property gives you the option to decide when it’s better for your app to give MetalFX the time it needs to compile the underlying upscaler of the temporal scaling effect. The two choices are:

  • As you create the effect

  • After you create the effect, likely when your app needs to upscale the initial textures

You can create a MFXTemporalScalingEffect instance that can upscale textures at its best speed immediately after you create it by setting this property to true and then calling the makeTemporalScaler(device:) method. However, it may take the framework more time for that method to return while the framework creates the temporal scaling effect and compiles its underlying scaler.

By default, the property is equal to false, which tells MetalFX to quickly create and return the temporal scaling-effect instance, and then compile a faster upscaler in the background. However, this means the effect can take more time to upscale textures while the framework compiles the underlying upscaler. When the framework finishes compiling, the effect runs just as fast as if you set the property to true.

See Also

Configuring a temporal effect’s input