Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/MetalFX/MTLFXFrameInterpolator.hpp
21224 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// MetalFX/MTLFXFrameInterpolator.hpp
4
//
5
// Copyright 2020-2025 Apple Inc.
6
//
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
// you may not use this file except in compliance with the License.
9
// You may obtain a copy of the License at
10
//
11
// http://www.apache.org/licenses/LICENSE-2.0
12
//
13
// Unless required by applicable law or agreed to in writing, software
14
// distributed under the License is distributed on an "AS IS" BASIS,
15
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
// See the License for the specific language governing permissions and
17
// limitations under the License.
18
//
19
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
20
21
#pragma once
22
23
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
24
25
#include "MTLFXDefines.hpp"
26
#include "MTLFXPrivate.hpp"
27
#include "MTLFXTemporalScaler.hpp"
28
29
#include "../Metal/Metal.hpp"
30
31
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
32
33
namespace MTL4FX
34
{
35
class TemporalScaler;
36
class TemporalDenoisedScaler;
37
class FrameInterpolator;
38
}
39
40
namespace MTLFX
41
{
42
class FrameInterpolatorDescriptor : public NS::Copying< FrameInterpolatorDescriptor >
43
{
44
public:
45
static FrameInterpolatorDescriptor* alloc();
46
FrameInterpolatorDescriptor* init();
47
48
MTL::PixelFormat colorTextureFormat() const;
49
void setColorTextureFormat(MTL::PixelFormat colorTextureFormat);
50
51
MTL::PixelFormat outputTextureFormat() const;
52
void setOutputTextureFormat(MTL::PixelFormat outputTextureFormat);
53
54
MTL::PixelFormat depthTextureFormat() const;
55
void setDepthTextureFormat(MTL::PixelFormat depthTextureFormat);
56
57
MTL::PixelFormat motionTextureFormat() const;
58
void setMotionTextureFormat(MTL::PixelFormat motionTextureFormat);
59
60
MTL::PixelFormat uiTextureFormat() const;
61
void setUITextureFormat(MTL::PixelFormat uiTextureFormat);
62
63
MTLFX::FrameInterpolatableScaler* scaler() const;
64
void setScaler(MTLFX::FrameInterpolatableScaler* scaler);
65
66
NS::UInteger inputWidth() const;
67
void setInputWidth( NS::UInteger inputWidth );
68
69
NS::UInteger inputHeight() const;
70
void setInputHeight( NS::UInteger inputHeight );
71
72
NS::UInteger outputWidth() const;
73
void setOutputWidth( NS::UInteger outputWidth );
74
75
NS::UInteger outputHeight() const;
76
void setOutputHeight( NS::UInteger outputHeight );
77
78
class FrameInterpolator* newFrameInterpolator( const MTL::Device* pDevice) const;
79
MTL4FX::FrameInterpolator* newFrameInterpolator( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler) const;
80
81
static bool supportsMetal4FX(MTL::Device* device);
82
static bool supportsDevice(MTL::Device* device);
83
};
84
85
class FrameInterpolatorBase : public NS::Referencing<FrameInterpolatorBase>
86
{
87
public:
88
MTL::TextureUsage colorTextureUsage() const;
89
MTL::TextureUsage outputTextureUsage() const;
90
MTL::TextureUsage depthTextureUsage() const;
91
MTL::TextureUsage motionTextureUsage() const;
92
MTL::TextureUsage uiTextureUsage() const;
93
94
MTL::PixelFormat colorTextureFormat() const;
95
MTL::PixelFormat depthTextureFormat() const;
96
MTL::PixelFormat motionTextureFormat() const;
97
MTL::PixelFormat outputTextureFormat() const;
98
99
NS::UInteger inputWidth() const;
100
NS::UInteger inputHeight() const;
101
NS::UInteger outputWidth() const;
102
NS::UInteger outputHeight() const;
103
MTL::PixelFormat uiTextureFormat() const;
104
105
MTL::Texture* colorTexture() const;
106
void setColorTexture(MTL::Texture* colorTexture);
107
108
MTL::Texture* prevColorTexture() const;
109
void setPrevColorTexture(MTL::Texture* prevColorTexture);
110
111
MTL::Texture* depthTexture() const;
112
void setDepthTexture(MTL::Texture* depthTexture);
113
114
MTL::Texture* motionTexture() const;
115
void setMotionTexture(MTL::Texture* motionTexture);
116
117
float motionVectorScaleX() const;
118
void setMotionVectorScaleX(float scaleX);
119
120
float motionVectorScaleY() const;
121
void setMotionVectorScaleY(float scaleY);
122
123
float deltaTime() const;
124
void setDeltaTime( float deltaTime );
125
126
float nearPlane() const;
127
void setNearPlane( float nearPlane );
128
129
float farPlane() const;
130
void setFarPlane( float farPlane );
131
132
float fieldOfView() const;
133
void setFieldOfView( float fieldOfView );
134
135
float aspectRatio() const;
136
void setAspectRatio( float aspectRatio );
137
138
MTL::Texture* uiTexture() const;
139
void setUITexture(MTL::Texture* uiTexture);
140
141
float jitterOffsetX() const;
142
void setJitterOffsetX( float jitterOffsetX );
143
144
float jitterOffsetY() const;
145
void setJitterOffsetY( float jitterOffsetY );
146
147
bool isUITextureComposited() const;
148
void setIsUITextureComposited( bool uiTextureComposited );
149
150
bool shouldResetHistory() const;
151
void setShouldResetHistory( bool shouldResetHistory );
152
153
MTL::Texture* outputTexture() const;
154
void setOutputTexture( MTL::Texture* outputTexture );
155
156
MTL::Fence* fence() const;
157
void setFence( MTL::Fence* fence );
158
159
bool isDepthReversed() const;
160
void setDepthReversed( bool depthReversed );
161
};
162
163
class FrameInterpolator : public NS::Referencing<FrameInterpolator, FrameInterpolatorBase>
164
{
165
public:
166
void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer);
167
};
168
169
}
170
171
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
172
173
_MTLFX_INLINE MTLFX::FrameInterpolatorDescriptor* MTLFX::FrameInterpolatorDescriptor::alloc()
174
{
175
return NS::Object::alloc< FrameInterpolatorDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXFrameInterpolatorDescriptor ) );
176
}
177
178
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
179
180
_MTLFX_INLINE MTLFX::FrameInterpolatorDescriptor* MTLFX::FrameInterpolatorDescriptor::init()
181
{
182
return NS::Object::init< FrameInterpolatorDescriptor >();
183
}
184
185
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
186
187
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::colorTextureFormat() const
188
{
189
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );
190
}
191
192
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
193
194
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setColorTextureFormat( MTL::PixelFormat colorTextureFormat )
195
{
196
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), colorTextureFormat );
197
}
198
199
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
200
201
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::outputTextureFormat() const
202
{
203
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );
204
}
205
206
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
207
208
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputTextureFormat( MTL::PixelFormat outputTextureFormat )
209
{
210
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), outputTextureFormat );
211
}
212
213
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
214
215
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::depthTextureFormat() const
216
{
217
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );
218
}
219
220
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
221
222
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setDepthTextureFormat( MTL::PixelFormat depthTextureFormat )
223
{
224
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), depthTextureFormat );
225
}
226
227
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
228
229
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::motionTextureFormat() const
230
{
231
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );
232
}
233
234
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
235
236
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setMotionTextureFormat( MTL::PixelFormat motionTextureFormat )
237
{
238
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), motionTextureFormat );
239
}
240
241
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
242
243
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorDescriptor::uiTextureFormat() const
244
{
245
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( uiTextureFormat ) );
246
}
247
248
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
249
250
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setUITextureFormat( MTL::PixelFormat uiTextureFormat )
251
{
252
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setUITextureFormat_ ), uiTextureFormat );
253
}
254
255
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
256
257
_MTLFX_INLINE MTLFX::FrameInterpolatableScaler* MTLFX::FrameInterpolatorDescriptor::scaler() const
258
{
259
return NS::Object::sendMessage< MTLFX::FrameInterpolatableScaler* >( this, _MTLFX_PRIVATE_SEL( scaler ) );
260
}
261
262
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setScaler(MTLFX::FrameInterpolatableScaler* scaler)
263
{
264
NS::Object::sendMessage< void >(this, _MTLFX_PRIVATE_SEL( setScaler_ ), scaler );
265
}
266
267
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
268
269
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::inputWidth() const
270
{
271
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );
272
}
273
274
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
275
276
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setInputWidth( NS::UInteger inputWidth )
277
{
278
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), inputWidth );
279
}
280
281
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
282
283
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::inputHeight() const
284
{
285
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );
286
}
287
288
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
289
290
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setInputHeight( NS::UInteger inputHeight )
291
{
292
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), inputHeight );
293
}
294
295
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
296
297
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::outputWidth() const
298
{
299
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );
300
}
301
302
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
303
304
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputWidth( NS::UInteger outputWidth )
305
{
306
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), outputWidth );
307
}
308
309
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
310
311
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorDescriptor::outputHeight() const
312
{
313
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );
314
}
315
316
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
317
318
_MTLFX_INLINE void MTLFX::FrameInterpolatorDescriptor::setOutputHeight( NS::UInteger outputHeight )
319
{
320
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), outputHeight );
321
}
322
323
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
324
325
_MTLFX_INLINE MTLFX::FrameInterpolator* MTLFX::FrameInterpolatorDescriptor::newFrameInterpolator( const MTL::Device* device ) const
326
{
327
return NS::Object::sendMessage< MTLFX::FrameInterpolator* >( this, _MTLFX_PRIVATE_SEL( newFrameInterpolatorWithDevice_ ), device );
328
}
329
330
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
331
332
_MTLFX_INLINE MTL4FX::FrameInterpolator* MTLFX::FrameInterpolatorDescriptor::newFrameInterpolator( const MTL::Device* device, const MTL4::Compiler* compiler ) const
333
{
334
return NS::Object::sendMessage< MTL4FX::FrameInterpolator* >( this, _MTLFX_PRIVATE_SEL( newFrameInterpolatorWithDevice_compiler_ ), device, compiler );
335
}
336
337
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
338
339
_MTLFX_INLINE bool MTLFX::FrameInterpolatorDescriptor::supportsMetal4FX(MTL::Device* device)
340
{
341
return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXFrameInterpolatorDescriptor), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), device );
342
}
343
344
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
345
346
_MTLFX_INLINE bool MTLFX::FrameInterpolatorDescriptor::supportsDevice(MTL::Device* device)
347
{
348
return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXFrameInterpolatorDescriptor), _MTLFX_PRIVATE_SEL( supportsDevice_ ), device );
349
}
350
351
352
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
353
354
_MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::colorTextureUsage() const
355
{
356
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) );
357
}
358
359
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
360
361
_MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::outputTextureUsage() const
362
{
363
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) );
364
}
365
366
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
367
368
_MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::depthTextureUsage() const
369
{
370
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) );
371
}
372
373
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
374
375
_MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::motionTextureUsage() const
376
{
377
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) );
378
}
379
380
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
381
382
_MTLFX_INLINE MTL::TextureUsage MTLFX::FrameInterpolatorBase::uiTextureUsage() const
383
{
384
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( uiTextureUsage ) );
385
}
386
387
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
388
389
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::colorTextureFormat() const
390
{
391
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );
392
}
393
394
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
395
396
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::depthTextureFormat() const
397
{
398
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );
399
}
400
401
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
402
403
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::motionTextureFormat() const
404
{
405
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );
406
}
407
408
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
409
410
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::outputTextureFormat() const
411
{
412
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );
413
}
414
415
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
416
417
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::inputWidth() const
418
{
419
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );
420
}
421
422
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
423
424
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::inputHeight() const
425
{
426
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );
427
}
428
429
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
430
431
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::outputWidth() const
432
{
433
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );
434
}
435
436
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
437
438
_MTLFX_INLINE NS::UInteger MTLFX::FrameInterpolatorBase::outputHeight() const
439
{
440
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );
441
}
442
443
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
444
445
_MTLFX_INLINE MTL::PixelFormat MTLFX::FrameInterpolatorBase::uiTextureFormat() const
446
{
447
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( uiTextureFormat ) );
448
}
449
450
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
451
452
_MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::colorTexture() const
453
{
454
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) );
455
}
456
457
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
458
459
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setColorTexture(MTL::Texture* colorTexture)
460
{
461
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), colorTexture );
462
}
463
464
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
465
466
_MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::prevColorTexture() const
467
{
468
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( prevColorTexture ) );
469
}
470
471
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
472
473
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setPrevColorTexture(MTL::Texture* prevColorTexture)
474
{
475
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPrevColorTexture_ ), prevColorTexture );
476
}
477
478
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
479
480
_MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::depthTexture() const
481
{
482
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) );
483
}
484
485
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
486
487
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDepthTexture(MTL::Texture* depthTexture)
488
{
489
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), depthTexture );
490
}
491
492
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
493
494
_MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::motionTexture() const
495
{
496
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) );
497
}
498
499
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
500
501
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionTexture(MTL::Texture* motionTexture)
502
{
503
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), motionTexture );
504
}
505
506
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
507
508
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::motionVectorScaleX() const
509
{
510
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) );
511
}
512
513
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
514
515
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionVectorScaleX(float scaleX)
516
{
517
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), scaleX );
518
}
519
520
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
521
522
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::motionVectorScaleY() const
523
{
524
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) );
525
}
526
527
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
528
529
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setMotionVectorScaleY(float scaleY)
530
{
531
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), scaleY );
532
}
533
534
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
535
536
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::deltaTime() const
537
{
538
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( deltaTime ) );
539
}
540
541
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
542
543
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDeltaTime( float deltaTime )
544
{
545
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDeltaTime_ ), deltaTime );
546
}
547
548
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
549
550
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::nearPlane() const
551
{
552
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( nearPlane ) );
553
}
554
555
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
556
557
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setNearPlane( float nearPlane )
558
{
559
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNearPlane_ ), nearPlane );
560
}
561
562
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
563
564
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::farPlane() const
565
{
566
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( farPlane ) );
567
}
568
569
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
570
571
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFarPlane( float farPlane )
572
{
573
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFarPlane_ ), farPlane );
574
}
575
576
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
577
578
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::fieldOfView() const
579
{
580
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( fieldOfView ) );
581
}
582
583
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
584
585
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFieldOfView( float fieldOfView )
586
{
587
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFieldOfView_ ), fieldOfView );
588
}
589
590
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
591
592
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::aspectRatio() const
593
{
594
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( aspectRatio ) );
595
}
596
597
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
598
599
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setAspectRatio( float aspectRatio )
600
{
601
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAspectRatio_ ), aspectRatio );
602
}
603
604
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
605
606
_MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::uiTexture() const
607
{
608
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( uiTexture ) );
609
}
610
611
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
612
613
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setUITexture(MTL::Texture* uiTexture)
614
{
615
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setUITexture_ ), uiTexture );
616
}
617
618
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
619
620
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::jitterOffsetX() const
621
{
622
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) );
623
}
624
625
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
626
627
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setJitterOffsetX( float jitterOffsetX )
628
{
629
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), jitterOffsetX );
630
}
631
632
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
633
634
_MTLFX_INLINE float MTLFX::FrameInterpolatorBase::jitterOffsetY() const
635
{
636
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) );
637
}
638
639
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
640
641
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setJitterOffsetY( float jitterOffsetY )
642
{
643
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), jitterOffsetY );
644
}
645
646
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
647
648
_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::isUITextureComposited() const
649
{
650
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isUITextureComposited ) );
651
}
652
653
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setIsUITextureComposited( bool uiTextureComposited )
654
{
655
NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setIsUITextureComposited_ ), uiTextureComposited );
656
}
657
658
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
659
660
_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::shouldResetHistory() const
661
{
662
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( shouldResetHistory ) );
663
}
664
665
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
666
667
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setShouldResetHistory(bool shouldResetHistory)
668
{
669
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setShouldResetHistory_ ), shouldResetHistory );
670
}
671
672
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
673
674
_MTLFX_INLINE MTL::Texture* MTLFX::FrameInterpolatorBase::outputTexture() const
675
{
676
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) );
677
}
678
679
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
680
681
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setOutputTexture(MTL::Texture* outputTexture)
682
{
683
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), outputTexture );
684
}
685
686
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
687
688
_MTLFX_INLINE MTL::Fence* MTLFX::FrameInterpolatorBase::fence() const
689
{
690
return NS::Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) );
691
}
692
693
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
694
695
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setFence(MTL::Fence* fence)
696
{
697
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), fence );
698
}
699
700
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
701
702
_MTLFX_INLINE bool MTLFX::FrameInterpolatorBase::isDepthReversed() const
703
{
704
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) );
705
}
706
707
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
708
709
_MTLFX_INLINE void MTLFX::FrameInterpolatorBase::setDepthReversed(bool depthReversed)
710
{
711
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed );
712
}
713
714
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
715
716
_MTLFX_INLINE void MTLFX::FrameInterpolator::encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer)
717
{
718
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer );
719
}
720
721