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 }

Discussion

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 temporal denoised scaler instance that can denoise and upscale textures at its best speed immediately after you create it by setting this property to true and then calling an initialization method like makeTemporalDenoisedScaler(device:). However, it may take MetalFX more time for that method to return while it creates the denoiser scaler and compiles its underlying pipelines.

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.