objc2_metal_fx/generated/
MTLFXFrameInterpolator.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7use objc2_metal::*;
8
9use crate::*;
10
11extern_class!(
12    /// A set of properties that configure a frame interpolator, and a factory method that creates the effect.
13    ///
14    /// A frame interpolator inspects two frames your game or app renders and, based on their properties, generates
15    /// an extra frame at a fraction of the cost, helping you to increase your frame rate.
16    ///
17    /// When you configure this descriptor, set the properties that determine the pixel format for each texture to the
18    /// respective format of the texture you later assign to the scaler. For example, make sure that the format to which
19    /// you set the ``colorTextureFormat`` property matches the format of the texture you later assign to the interpolator's
20    /// ``MTLFXFrameInterpolatorDescriptor/colorTexture`` property.
21    ///
22    /// See also [Apple's documentation](https://developer.apple.com/documentation/metalfx/mtlfxframeinterpolatordescriptor?language=objc)
23    #[unsafe(super(NSObject))]
24    #[derive(Debug, PartialEq, Eq, Hash)]
25    pub struct MTLFXFrameInterpolatorDescriptor;
26);
27
28extern_conformance!(
29    unsafe impl NSCopying for MTLFXFrameInterpolatorDescriptor {}
30);
31
32unsafe impl CopyingHelper for MTLFXFrameInterpolatorDescriptor {
33    type Result = Self;
34}
35
36extern_conformance!(
37    unsafe impl NSObjectProtocol for MTLFXFrameInterpolatorDescriptor {}
38);
39
40impl MTLFXFrameInterpolatorDescriptor {
41    extern_methods!(
42        /// The pixel format of the input color texture for the frame interpolator you create with this descriptor.
43        #[unsafe(method(colorTextureFormat))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn colorTextureFormat(&self) -> MTLPixelFormat;
46
47        /// Setter for [`colorTextureFormat`][Self::colorTextureFormat].
48        #[unsafe(method(setColorTextureFormat:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn setColorTextureFormat(&self, color_texture_format: MTLPixelFormat);
51
52        /// The pixel format of the output color texture for the frame interpolator you create with this descriptor.
53        #[unsafe(method(outputTextureFormat))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn outputTextureFormat(&self) -> MTLPixelFormat;
56
57        /// Setter for [`outputTextureFormat`][Self::outputTextureFormat].
58        #[unsafe(method(setOutputTextureFormat:))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn setOutputTextureFormat(&self, output_texture_format: MTLPixelFormat);
61
62        /// The pixel format of the input depth texture for the frame interpolator you create with this descriptor.
63        #[unsafe(method(depthTextureFormat))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn depthTextureFormat(&self) -> MTLPixelFormat;
66
67        /// Setter for [`depthTextureFormat`][Self::depthTextureFormat].
68        #[unsafe(method(setDepthTextureFormat:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setDepthTextureFormat(&self, depth_texture_format: MTLPixelFormat);
71
72        /// The pixel format of the input motion texture for the frame interpolator you create with this descriptor.
73        #[unsafe(method(motionTextureFormat))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn motionTextureFormat(&self) -> MTLPixelFormat;
76
77        /// Setter for [`motionTextureFormat`][Self::motionTextureFormat].
78        #[unsafe(method(setMotionTextureFormat:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn setMotionTextureFormat(&self, motion_texture_format: MTLPixelFormat);
81
82        /// The pixel format for the frame interpolator of an input texture containing your game's custom UI.
83        #[unsafe(method(uiTextureFormat))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn uiTextureFormat(&self) -> MTLPixelFormat;
86
87        /// Setter for [`uiTextureFormat`][Self::uiTextureFormat].
88        #[unsafe(method(setUITextureFormat:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setUITextureFormat(&self, ui_texture_format: MTLPixelFormat);
91
92        #[cfg(feature = "MTLFXTemporalScaler")]
93        #[unsafe(method(scaler))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn scaler(
96            &self,
97        ) -> Option<Retained<ProtocolObject<dyn MTLFXFrameInterpolatableScaler>>>;
98
99        #[cfg(feature = "MTLFXTemporalScaler")]
100        /// Setter for [`scaler`][Self::scaler].
101        #[unsafe(method(setScaler:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn setScaler(
104            &self,
105            scaler: Option<&ProtocolObject<dyn MTLFXFrameInterpolatableScaler>>,
106        );
107
108        /// The width, in pixels, of the input motion and depth texture for the frame interpolator.
109        #[unsafe(method(inputWidth))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn inputWidth(&self) -> NSUInteger;
112
113        /// Setter for [`inputWidth`][Self::inputWidth].
114        #[unsafe(method(setInputWidth:))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn setInputWidth(&self, input_width: NSUInteger);
117
118        /// The height, in pixels, of the input motion and depth texture for the frame interpolator.
119        #[unsafe(method(inputHeight))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn inputHeight(&self) -> NSUInteger;
122
123        /// Setter for [`inputHeight`][Self::inputHeight].
124        #[unsafe(method(setInputHeight:))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn setInputHeight(&self, input_height: NSUInteger);
127
128        /// The width, in pixels, of the output color texture for the frame interpolator.
129        #[unsafe(method(outputWidth))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn outputWidth(&self) -> NSUInteger;
132
133        /// Setter for [`outputWidth`][Self::outputWidth].
134        #[unsafe(method(setOutputWidth:))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn setOutputWidth(&self, output_width: NSUInteger);
137
138        /// The height, in pixels, of the output color texture for the frame interpolator.
139        #[unsafe(method(outputHeight))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn outputHeight(&self) -> NSUInteger;
142
143        /// Setter for [`outputHeight`][Self::outputHeight].
144        #[unsafe(method(setOutputHeight:))]
145        #[unsafe(method_family = none)]
146        pub unsafe fn setOutputHeight(&self, output_height: NSUInteger);
147
148        /// Creates a frame interpolator instance for a Metal device.
149        ///
150        /// - Parameters:
151        /// - device: The Metal device that creates the frame interpolator.
152        /// - Returns:
153        /// A new frame interpolator instance upon success, or `nil` otherwise.
154        #[unsafe(method(newFrameInterpolatorWithDevice:))]
155        #[unsafe(method_family = new)]
156        pub unsafe fn newFrameInterpolatorWithDevice(
157            &self,
158            device: &ProtocolObject<dyn MTLDevice>,
159        ) -> Option<Retained<ProtocolObject<dyn MTLFXFrameInterpolator>>>;
160
161        #[cfg(feature = "MTL4FXFrameInterpolator")]
162        /// Creates a frame interpolator instance for a Metal device.
163        ///
164        /// - Parameters:
165        /// - device: The Metal device that creates the frame interpolator.
166        /// - compiler: A compiler instance this method can use to build pipeline state objects.
167        /// - Returns:
168        /// A new frame interpolator instance upon success, or `nil` otherwise.
169        #[unsafe(method(newFrameInterpolatorWithDevice:compiler:))]
170        #[unsafe(method_family = new)]
171        pub unsafe fn newFrameInterpolatorWithDevice_compiler(
172            &self,
173            device: &ProtocolObject<dyn MTLDevice>,
174            compiler: &ProtocolObject<dyn MTL4Compiler>,
175        ) -> Option<Retained<ProtocolObject<dyn MTL4FXFrameInterpolator>>>;
176
177        /// Queries whether a Metal device supports frame interpolation compatible with a Metal 4 command buffer.
178        ///
179        /// - Parameters:
180        /// - device: The GPU device for which this methods tests support.
181        ///
182        /// - Returns:
183        /// <doc
184        /// ://com.apple.documentation/documentation/swift/true> if the device supports frame interpolation for
185        /// Metal 4,
186        /// <doc
187        /// ://com.apple.documentation/documentation/swift/false> otherwise.
188        #[unsafe(method(supportsMetal4FX:))]
189        #[unsafe(method_family = none)]
190        pub unsafe fn supportsMetal4FX(device: &ProtocolObject<dyn MTLDevice>) -> bool;
191
192        /// Queries whether a Metal device supports frame interpolation.
193        ///
194        /// - Parameters:
195        /// - device: The GPU device for which this methods tests support.
196        ///
197        /// - Returns:
198        /// <doc
199        /// ://com.apple.documentation/documentation/swift/true> if the device supports frame interpolation,
200        /// <doc
201        /// ://com.apple.documentation/documentation/swift/false> otherwise.
202        #[unsafe(method(supportsDevice:))]
203        #[unsafe(method_family = none)]
204        pub unsafe fn supportsDevice(device: &ProtocolObject<dyn MTLDevice>) -> bool;
205    );
206}
207
208/// Methods declared on superclass `NSObject`.
209impl MTLFXFrameInterpolatorDescriptor {
210    extern_methods!(
211        #[unsafe(method(init))]
212        #[unsafe(method_family = init)]
213        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
214
215        #[unsafe(method(new))]
216        #[unsafe(method_family = new)]
217        pub unsafe fn new() -> Retained<Self>;
218    );
219}
220
221extern_protocol!(
222    /// [Apple's documentation](https://developer.apple.com/documentation/metalfx/mtlfxframeinterpolatorbase?language=objc)
223    pub unsafe trait MTLFXFrameInterpolatorBase: NSObjectProtocol {
224        /// The minimal texture usage options that your app’s input color texture needs in order to support this frame interpolator.
225        #[unsafe(method(colorTextureUsage))]
226        #[unsafe(method_family = none)]
227        unsafe fn colorTextureUsage(&self) -> MTLTextureUsage;
228
229        /// The minimal texture usage options that your app’s output color texture needs in order to support this frame interpolator.
230        #[unsafe(method(outputTextureUsage))]
231        #[unsafe(method_family = none)]
232        unsafe fn outputTextureUsage(&self) -> MTLTextureUsage;
233
234        /// The minimal texture usage options that your app’s input depth texture needs in order to support this frame interpolator.
235        #[unsafe(method(depthTextureUsage))]
236        #[unsafe(method_family = none)]
237        unsafe fn depthTextureUsage(&self) -> MTLTextureUsage;
238
239        /// The minimal texture usage options that your app’s input motion texture needs in order to support this frame interpolator.
240        #[unsafe(method(motionTextureUsage))]
241        #[unsafe(method_family = none)]
242        unsafe fn motionTextureUsage(&self) -> MTLTextureUsage;
243
244        /// The minimal texture usage options that your app’s input UI texture needs in order to support this frame interpolator.
245        #[unsafe(method(uiTextureUsage))]
246        #[unsafe(method_family = none)]
247        unsafe fn uiTextureUsage(&self) -> MTLTextureUsage;
248
249        /// The pixel format of the input color texture for this frame interpolator.
250        #[unsafe(method(colorTextureFormat))]
251        #[unsafe(method_family = none)]
252        unsafe fn colorTextureFormat(&self) -> MTLPixelFormat;
253
254        /// The pixel format of the input depth texture for this frame interpolator.
255        #[unsafe(method(depthTextureFormat))]
256        #[unsafe(method_family = none)]
257        unsafe fn depthTextureFormat(&self) -> MTLPixelFormat;
258
259        /// The pixel format of the input motion texture for this frame interpolator.
260        #[unsafe(method(motionTextureFormat))]
261        #[unsafe(method_family = none)]
262        unsafe fn motionTextureFormat(&self) -> MTLPixelFormat;
263
264        /// The pixel format of the output color texture for this frame interpolator.
265        #[unsafe(method(outputTextureFormat))]
266        #[unsafe(method_family = none)]
267        unsafe fn outputTextureFormat(&self) -> MTLPixelFormat;
268
269        /// The width, in pixels, of the input color texture for the frame interpolator.
270        #[unsafe(method(inputWidth))]
271        #[unsafe(method_family = none)]
272        unsafe fn inputWidth(&self) -> NSUInteger;
273
274        /// The height, in pixels, of the input color texture for the frame interpolator.
275        #[unsafe(method(inputHeight))]
276        #[unsafe(method_family = none)]
277        unsafe fn inputHeight(&self) -> NSUInteger;
278
279        /// The width, in pixels, of the output color texture for the frame interpolator.
280        #[unsafe(method(outputWidth))]
281        #[unsafe(method_family = none)]
282        unsafe fn outputWidth(&self) -> NSUInteger;
283
284        /// The height, in pixels, of the output color texture for the frame interpolator.
285        #[unsafe(method(outputHeight))]
286        #[unsafe(method_family = none)]
287        unsafe fn outputHeight(&self) -> NSUInteger;
288
289        /// The pixel format of the input UI texture for the frame interpolator.
290        #[unsafe(method(uiTextureFormat))]
291        #[unsafe(method_family = none)]
292        unsafe fn uiTextureFormat(&self) -> MTLPixelFormat;
293
294        /// The color texture that this frame interpolator evaluates.
295        ///
296        /// You are responsible for ensuring the usage and pixel format of the texture you assign to this property matches the
297        /// texture usage ``colorTextureUsage`` requests and the pixel format that ``colorTextureFormat`` requests.
298        #[unsafe(method(colorTexture))]
299        #[unsafe(method_family = none)]
300        unsafe fn colorTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
301
302        /// Setter for [`colorTexture`][Self::colorTexture].
303        ///
304        /// # Safety
305        ///
306        /// - `color_texture` may need to be synchronized.
307        /// - `color_texture` may be unretained, you must ensure it is kept alive while in use.
308        #[unsafe(method(setColorTexture:))]
309        #[unsafe(method_family = none)]
310        unsafe fn setColorTexture(&self, color_texture: Option<&ProtocolObject<dyn MTLTexture>>);
311
312        /// The previous color texture for this frame interpolator during the last call to encode work into a command buffer.
313        ///
314        /// The frame interpolator typically uses the previous color texture as part of its operation. When you call
315        /// ``MTLFXFrameInterpolator/encodeToCommandBuffer:`` and its ``shouldResetHistory`` property is
316        /// <doc
317        /// ://com.apple.documentation/documentation/swift/false>, then you are responsible for assigning to this property
318        /// the data that in ``colorTexture`` from the previous call to ``MTLFXFrameInterpolator/encodeToCommandBuffer:``.
319        ///
320        /// Additionally, you are responsible for ensuring the usage and pixel format of the texture you assign to this property matches the
321        /// texture usage ``colorTextureUsage`` requests and the pixel format that ``colorTextureFormat`` requests.
322        #[unsafe(method(prevColorTexture))]
323        #[unsafe(method_family = none)]
324        unsafe fn prevColorTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
325
326        /// Setter for [`prevColorTexture`][Self::prevColorTexture].
327        ///
328        /// # Safety
329        ///
330        /// - `prev_color_texture` may need to be synchronized.
331        /// - `prev_color_texture` may be unretained, you must ensure it is kept alive while in use.
332        #[unsafe(method(setPrevColorTexture:))]
333        #[unsafe(method_family = none)]
334        unsafe fn setPrevColorTexture(
335            &self,
336            prev_color_texture: Option<&ProtocolObject<dyn MTLTexture>>,
337        );
338
339        /// The depth texture this frame interpolator evaluates.
340        ///
341        /// You are responsible for ensuring the usage and pixel format of the texture you assign to this property matches the
342        /// texture usage ``depthTextureUsage`` requests and the pixel format that ``depthTextureFormat`` requests.
343        #[unsafe(method(depthTexture))]
344        #[unsafe(method_family = none)]
345        unsafe fn depthTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
346
347        /// Setter for [`depthTexture`][Self::depthTexture].
348        ///
349        /// # Safety
350        ///
351        /// - `depth_texture` may need to be synchronized.
352        /// - `depth_texture` may be unretained, you must ensure it is kept alive while in use.
353        #[unsafe(method(setDepthTexture:))]
354        #[unsafe(method_family = none)]
355        unsafe fn setDepthTexture(&self, depth_texture: Option<&ProtocolObject<dyn MTLTexture>>);
356
357        /// The motion texture this frame interpolator evaluates.
358        ///
359        /// You are responsible for ensuring the usage and pixel format of the texture you assign to this property matches the
360        /// texture usage ``motionTextureUsage`` requests and the pixel format that ``motionTextureFormat`` requests.
361        #[unsafe(method(motionTexture))]
362        #[unsafe(method_family = none)]
363        unsafe fn motionTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
364
365        /// Setter for [`motionTexture`][Self::motionTexture].
366        ///
367        /// # Safety
368        ///
369        /// - `motion_texture` may need to be synchronized.
370        /// - `motion_texture` may be unretained, you must ensure it is kept alive while in use.
371        #[unsafe(method(setMotionTexture:))]
372        #[unsafe(method_family = none)]
373        unsafe fn setMotionTexture(&self, motion_texture: Option<&ProtocolObject<dyn MTLTexture>>);
374
375        /// The horizontal scale factor the frame interpolator applies to the input motion texture.
376        ///
377        /// The frame interpolator converts the horizontal component of each value in ``motionTexture`` into fragment (pixel)
378        /// coordinates by multiplying it by this property’s value.
379        ///
380        /// If you set this property's value to `1.0`, this interpolator expects that each pixel's motion vector points
381        /// to the location where that pixel is in the ``prevColorTexture``. For example, in Metal's standard device coordinates
382        /// where `(0,0)` represents the upper-left corner of the framebuffer, the motion vectors for an object that moves down
383        /// and to the right in the ``colorTexture`` by `10` pixels would be `(-10,-10)`.
384        #[unsafe(method(motionVectorScaleX))]
385        #[unsafe(method_family = none)]
386        unsafe fn motionVectorScaleX(&self) -> c_float;
387
388        /// Setter for [`motionVectorScaleX`][Self::motionVectorScaleX].
389        #[unsafe(method(setMotionVectorScaleX:))]
390        #[unsafe(method_family = none)]
391        unsafe fn setMotionVectorScaleX(&self, motion_vector_scale_x: c_float);
392
393        /// The vertical scale factor the frame interpolator applies to the input motion texture.
394        ///
395        /// The frame interpolator converts the horizontal component of each value in ``motionTexture`` into fragment (pixel)
396        /// coordinates by multiplying it by this property’s value.
397        ///
398        /// If you set this property's value to `1.0`, this interpolator expects that each pixel's motion vector points
399        /// to the location where that pixel is in the ``prevColorTexture``. For example, in Metal's standard device coordinates
400        /// where `(0,0)` represents the upper-left corner of the framebuffer, the motion vectors for an object that moves down
401        /// and to the right in the ``colorTexture`` by `10` pixels would be `(-10,-10)`.
402        #[unsafe(method(motionVectorScaleY))]
403        #[unsafe(method_family = none)]
404        unsafe fn motionVectorScaleY(&self) -> c_float;
405
406        /// Setter for [`motionVectorScaleY`][Self::motionVectorScaleY].
407        #[unsafe(method(setMotionVectorScaleY:))]
408        #[unsafe(method_family = none)]
409        unsafe fn setMotionVectorScaleY(&self, motion_vector_scale_y: c_float);
410
411        /// The length of the time interval, in seconds, between time of current and previous frame.
412        #[unsafe(method(deltaTime))]
413        #[unsafe(method_family = none)]
414        unsafe fn deltaTime(&self) -> c_float;
415
416        /// Setter for [`deltaTime`][Self::deltaTime].
417        #[unsafe(method(setDeltaTime:))]
418        #[unsafe(method_family = none)]
419        unsafe fn setDeltaTime(&self, delta_time: c_float);
420
421        /// The near plane distance that corresponds to the frustrum that renders the scene into the color buffer.
422        #[unsafe(method(nearPlane))]
423        #[unsafe(method_family = none)]
424        unsafe fn nearPlane(&self) -> c_float;
425
426        /// Setter for [`nearPlane`][Self::nearPlane].
427        #[unsafe(method(setNearPlane:))]
428        #[unsafe(method_family = none)]
429        unsafe fn setNearPlane(&self, near_plane: c_float);
430
431        /// The far plane distance that corresponds to the frustrum that renders the scene into the color buffer.
432        #[unsafe(method(farPlane))]
433        #[unsafe(method_family = none)]
434        unsafe fn farPlane(&self) -> c_float;
435
436        /// Setter for [`farPlane`][Self::farPlane].
437        #[unsafe(method(setFarPlane:))]
438        #[unsafe(method_family = none)]
439        unsafe fn setFarPlane(&self, far_plane: c_float);
440
441        /// The vertical field of view angle, in degrees, of the camera that renders the scene into the color buffer.
442        ///
443        /// In a 3D game, you set this value to the field of view you use to create your perspective matrix.
444        #[unsafe(method(fieldOfView))]
445        #[unsafe(method_family = none)]
446        unsafe fn fieldOfView(&self) -> c_float;
447
448        /// Setter for [`fieldOfView`][Self::fieldOfView].
449        #[unsafe(method(setFieldOfView:))]
450        #[unsafe(method_family = none)]
451        unsafe fn setFieldOfView(&self, field_of_view: c_float);
452
453        /// The ratio between width and height of the screen.
454        ///
455        /// In a 3D game, you set this value to the same aspect ratio you use to create your perspective matrix, which is
456        /// typically `width/height`.
457        #[unsafe(method(aspectRatio))]
458        #[unsafe(method_family = none)]
459        unsafe fn aspectRatio(&self) -> c_float;
460
461        /// Setter for [`aspectRatio`][Self::aspectRatio].
462        #[unsafe(method(setAspectRatio:))]
463        #[unsafe(method_family = none)]
464        unsafe fn setAspectRatio(&self, aspect_ratio: c_float);
465
466        /// An optional texture containing your game's custom UI that this frame interpolator evaluates.
467        ///
468        /// The frame interpolator uses this property to overlay your custom UI on any frame data it produces into ``outputTexture``.
469        ///
470        /// Use property ``uiTextureComposited`` to indicate to this frame interpolator if ``colorTexture`` contains a precomposition
471        /// of this UI to avoid it producing incorrect results for the overlay.
472        #[unsafe(method(uiTexture))]
473        #[unsafe(method_family = none)]
474        unsafe fn uiTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
475
476        /// Setter for [`uiTexture`][Self::uiTexture].
477        ///
478        /// # Safety
479        ///
480        /// - `ui_texture` may need to be synchronized.
481        /// - `ui_texture` may be unretained, you must ensure it is kept alive while in use.
482        #[unsafe(method(setUITexture:))]
483        #[unsafe(method_family = none)]
484        unsafe fn setUITexture(&self, ui_texture: Option<&ProtocolObject<dyn MTLTexture>>);
485
486        /// The horizontal component of the subpixel sampling coordinate you use to generate the color texture input.
487        ///
488        /// This property indicates the horizontal pixel offset this interpolator samples to return to the frame's reference frame.
489        #[unsafe(method(jitterOffsetX))]
490        #[unsafe(method_family = none)]
491        unsafe fn jitterOffsetX(&self) -> c_float;
492
493        /// Setter for [`jitterOffsetX`][Self::jitterOffsetX].
494        #[unsafe(method(setJitterOffsetX:))]
495        #[unsafe(method_family = none)]
496        unsafe fn setJitterOffsetX(&self, jitter_offset_x: c_float);
497
498        /// The vertical component of the subpixel sampling coordinate you use to generate the color texture input.
499        ///
500        /// This property indicates the vertical pixel offset this interpolator samples to return to the frame's reference frame.
501        #[unsafe(method(jitterOffsetY))]
502        #[unsafe(method_family = none)]
503        unsafe fn jitterOffsetY(&self) -> c_float;
504
505        /// Setter for [`jitterOffsetY`][Self::jitterOffsetY].
506        #[unsafe(method(setJitterOffsetY:))]
507        #[unsafe(method_family = none)]
508        unsafe fn setJitterOffsetY(&self, jitter_offset_y: c_float);
509
510        /// A Boolean value that controls whether this frame interpolator interprets the color texture to include your game's custom UI.
511        ///
512        /// Set this property to
513        /// <doc
514        /// ://com.apple.documentation/documentation/swift/true> when property ``uiTexture`` contains
515        /// a precomposition of any custom UI image on top of the color image.
516        ///
517        /// When you enable this property, the frame interpolator decomposites the color image ``colorTexture`` references from
518        /// the UI ``uiTexture`` references before compositing the UI on to the ``outputTexture``.
519        ///
520        /// This property's default value is
521        /// <doc
522        /// ://com.apple.documentation/documentation/swift/false>.
523        #[unsafe(method(isUITextureComposited))]
524        #[unsafe(method_family = none)]
525        unsafe fn isUITextureComposited(&self) -> bool;
526
527        /// Setter for [`isUITextureComposited`][Self::isUITextureComposited].
528        #[unsafe(method(setIsUITextureComposited:))]
529        #[unsafe(method_family = none)]
530        unsafe fn setIsUITextureComposited(&self, ui_texture_composited: bool);
531
532        /// A Boolean property indicating whether to reset history.
533        ///
534        /// Set this property to
535        /// <doc
536        /// ://com.apple.documentation/documentation/swift/true> to invalidate history, for example
537        /// when there is a scene cut in your game.
538        ///
539        /// When you set this property to
540        /// <doc
541        /// ://com.apple.documentation/documentation/swift/false>, you are responsible for
542        /// ensuring the property ``prevColorTexture`` contains frame data corresponding to that in ``colorTexture`` during
543        /// your previous call to ``MTLFXFrameInterpolator/encodeToCommandBuffer:``.
544        #[unsafe(method(shouldResetHistory))]
545        #[unsafe(method_family = none)]
546        unsafe fn shouldResetHistory(&self) -> bool;
547
548        /// Setter for [`shouldResetHistory`][Self::shouldResetHistory].
549        #[unsafe(method(setShouldResetHistory:))]
550        #[unsafe(method_family = none)]
551        unsafe fn setShouldResetHistory(&self, should_reset_history: bool);
552
553        /// The output texture into which this frame interpolator writes its output.
554        ///
555        /// You are responsible for providing a texture with a private `storageMode` to this property.
556        #[unsafe(method(outputTexture))]
557        #[unsafe(method_family = none)]
558        unsafe fn outputTexture(&self) -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
559
560        /// Setter for [`outputTexture`][Self::outputTexture].
561        ///
562        /// # Safety
563        ///
564        /// - `output_texture` may need to be synchronized.
565        /// - `output_texture` may be unretained, you must ensure it is kept alive while in use.
566        #[unsafe(method(setOutputTexture:))]
567        #[unsafe(method_family = none)]
568        unsafe fn setOutputTexture(&self, output_texture: Option<&ProtocolObject<dyn MTLTexture>>);
569
570        /// An optional fence that this frame interpolator waits for and updates.
571        ///
572        /// Use this property for synchronizing access to untracked resources.
573        #[unsafe(method(fence))]
574        #[unsafe(method_family = none)]
575        unsafe fn fence(&self) -> Option<Retained<ProtocolObject<dyn MTLFence>>>;
576
577        /// Setter for [`fence`][Self::fence].
578        #[unsafe(method(setFence:))]
579        #[unsafe(method_family = none)]
580        unsafe fn setFence(&self, fence: Option<&ProtocolObject<dyn MTLFence>>);
581
582        /// A Boolean value that indicates whether the depth texture uses zero to represent the farthest distance.
583        ///
584        /// This property's default value is
585        /// <doc
586        /// ://com.apple.documentation/documentation/swift/true>.
587        #[unsafe(method(isDepthReversed))]
588        #[unsafe(method_family = none)]
589        unsafe fn isDepthReversed(&self) -> bool;
590
591        /// Setter for [`isDepthReversed`][Self::isDepthReversed].
592        #[unsafe(method(setDepthReversed:))]
593        #[unsafe(method_family = none)]
594        unsafe fn setDepthReversed(&self, depth_reversed: bool);
595    }
596);
597
598extern_protocol!(
599    /// [Apple's documentation](https://developer.apple.com/documentation/metalfx/mtlfxframeinterpolator?language=objc)
600    pub unsafe trait MTLFXFrameInterpolator: MTLFXFrameInterpolatorBase {
601        /// Encode this frame interpolator's work into a command buffer.
602        ///
603        /// - Parameters:
604        /// - commandBuffer: A command buffer into which this frame interpolator encodes work.
605        #[unsafe(method(encodeToCommandBuffer:))]
606        #[unsafe(method_family = none)]
607        unsafe fn encodeToCommandBuffer(
608            &self,
609            command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
610        );
611    }
612);