Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/MetalFX/MTLFXTemporalScaler.hpp
21425 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// MetalFX/MTLFXTemporalScaler.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
28
#include "../Metal/Metal.hpp"
29
30
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
31
32
namespace MTL4FX
33
{
34
class TemporalScaler;
35
}
36
37
namespace MTLFX
38
{
39
class TemporalScalerDescriptor : public NS::Copying< TemporalScalerDescriptor >
40
{
41
public:
42
static class TemporalScalerDescriptor* alloc();
43
class TemporalScalerDescriptor* init();
44
45
MTL::PixelFormat colorTextureFormat() const;
46
void setColorTextureFormat( MTL::PixelFormat format );
47
48
MTL::PixelFormat depthTextureFormat() const;
49
void setDepthTextureFormat( MTL::PixelFormat format );
50
51
MTL::PixelFormat motionTextureFormat() const;
52
void setMotionTextureFormat( MTL::PixelFormat format );
53
54
MTL::PixelFormat outputTextureFormat() const;
55
void setOutputTextureFormat( MTL::PixelFormat format );
56
57
NS::UInteger inputWidth() const;
58
void setInputWidth( NS::UInteger width );
59
60
NS::UInteger inputHeight() const;
61
void setInputHeight( NS::UInteger height );
62
63
NS::UInteger outputWidth() const;
64
void setOutputWidth( NS::UInteger width );
65
66
NS::UInteger outputHeight() const;
67
void setOutputHeight( NS::UInteger height );
68
69
bool isAutoExposureEnabled() const;
70
void setAutoExposureEnabled( bool enabled );
71
72
bool isInputContentPropertiesEnabled() const;
73
void setInputContentPropertiesEnabled( bool enabled );
74
75
bool requiresSynchronousInitialization() const;
76
void setRequiresSynchronousInitialization(bool requiresSynchronousInitialization);
77
78
bool isReactiveMaskTextureEnabled() const;
79
void setReactiveMaskTextureEnabled( bool enabled );
80
81
MTL::PixelFormat reactiveMaskTextureFormat() const;
82
void setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat );
83
84
float inputContentMinScale() const;
85
void setInputContentMinScale( float scale );
86
87
float inputContentMaxScale() const;
88
void setInputContentMaxScale( float scale );
89
90
class TemporalScaler* newTemporalScaler( const MTL::Device* pDevice ) const;
91
MTL4FX::TemporalScaler* newTemporalScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler) const;
92
93
static float supportedInputContentMinScale( const MTL::Device* pDevice );
94
static float supportedInputContentMaxScale( const MTL::Device* pDevice );
95
96
static bool supportsDevice( const MTL::Device* pDevice );
97
static bool supportsMetal4FX( const MTL::Device* pDevice );
98
};
99
100
class FrameInterpolatableScaler : public NS::Copying< FrameInterpolatableScaler >
101
{
102
};
103
104
class TemporalScalerBase : public NS::Referencing< TemporalScaler, FrameInterpolatableScaler >
105
{
106
public:
107
MTL::TextureUsage colorTextureUsage() const;
108
MTL::TextureUsage depthTextureUsage() const;
109
MTL::TextureUsage motionTextureUsage() const;
110
MTL::TextureUsage outputTextureUsage() const;
111
112
NS::UInteger inputContentWidth() const;
113
void setInputContentWidth( NS::UInteger width );
114
115
NS::UInteger inputContentHeight() const;
116
void setInputContentHeight( NS::UInteger height );
117
118
MTL::Texture* colorTexture() const;
119
void setColorTexture( MTL::Texture* pTexture );
120
121
MTL::Texture* depthTexture() const;
122
void setDepthTexture( MTL::Texture* pTexture );
123
124
MTL::Texture* motionTexture() const;
125
void setMotionTexture( MTL::Texture* pTexture );
126
127
MTL::Texture* outputTexture() const;
128
void setOutputTexture( MTL::Texture* pTexture );
129
130
MTL::Texture* exposureTexture() const;
131
void setExposureTexture( MTL::Texture* pTexture );
132
133
float preExposure() const;
134
void setPreExposure( float preExposure );
135
136
float jitterOffsetX() const;
137
void setJitterOffsetX( float offset );
138
139
float jitterOffsetY() const;
140
void setJitterOffsetY( float offset );
141
142
float motionVectorScaleX() const;
143
void setMotionVectorScaleX( float scale );
144
145
float motionVectorScaleY() const;
146
void setMotionVectorScaleY( float scale );
147
148
MTL::Texture* reactiveMaskTexture() const;
149
void setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture );
150
151
MTL::TextureUsage reactiveTextureUsage() const;
152
153
bool reset() const;
154
void setReset( bool reset );
155
156
bool isDepthReversed() const;
157
void setDepthReversed( bool depthReversed );
158
159
MTL::PixelFormat colorTextureFormat() const;
160
MTL::PixelFormat depthTextureFormat() const;
161
MTL::PixelFormat motionTextureFormat() const;
162
MTL::PixelFormat reactiveTextureFormat() const;
163
MTL::PixelFormat outputTextureFormat() const;
164
NS::UInteger inputWidth() const;
165
NS::UInteger inputHeight() const;
166
NS::UInteger outputWidth() const;
167
NS::UInteger outputHeight() const;
168
float inputContentMinScale() const;
169
float inputContentMaxScale() const;
170
171
MTL::Fence* fence() const;
172
void setFence( MTL::Fence* pFence );
173
};
174
175
class TemporalScaler : public NS::Referencing< TemporalScaler, TemporalScalerBase >
176
{
177
public:
178
void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer );
179
};
180
}
181
182
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
183
184
_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::alloc()
185
{
186
return NS::Object::alloc< TemporalScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ) );
187
}
188
189
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
190
191
_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::init()
192
{
193
return NS::Object::init< TemporalScalerDescriptor >();
194
}
195
196
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
197
198
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::colorTextureFormat() const
199
{
200
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );
201
}
202
203
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
204
205
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format )
206
{
207
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), format );
208
}
209
210
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
211
212
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::depthTextureFormat() const
213
{
214
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );
215
}
216
217
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
218
219
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat format )
220
{
221
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), format );
222
}
223
224
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
225
226
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::motionTextureFormat() const
227
{
228
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );
229
}
230
231
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
232
233
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat format )
234
{
235
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), format );
236
}
237
238
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
239
240
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::outputTextureFormat() const
241
{
242
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );
243
}
244
245
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
246
247
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format )
248
{
249
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), format );
250
}
251
252
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
253
254
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputWidth() const
255
{
256
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );
257
}
258
259
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
260
261
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputWidth( NS::UInteger width )
262
{
263
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), width );
264
}
265
266
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
267
268
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputHeight() const
269
{
270
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );
271
}
272
273
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
274
275
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputHeight( NS::UInteger height )
276
{
277
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), height );
278
}
279
280
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
281
282
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputWidth() const
283
{
284
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );
285
}
286
287
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
288
289
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputWidth( NS::UInteger width )
290
{
291
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), width );
292
}
293
294
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
295
296
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputHeight() const
297
{
298
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );
299
}
300
301
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
302
303
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputHeight( NS::UInteger height )
304
{
305
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), height );
306
}
307
308
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
309
310
_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isAutoExposureEnabled() const
311
{
312
return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) );
313
}
314
315
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
316
317
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setAutoExposureEnabled( bool enabled )
318
{
319
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled );
320
}
321
322
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
323
324
_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isInputContentPropertiesEnabled() const
325
{
326
return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) );
327
}
328
329
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
330
331
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentPropertiesEnabled( bool enabled )
332
{
333
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled );
334
}
335
336
337
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
338
339
_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::requiresSynchronousInitialization() const
340
{
341
return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( requiresSynchronousInitialization ) );
342
}
343
344
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
345
346
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setRequiresSynchronousInitialization(bool requiresSynchronousInitialization)
347
{
348
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRequiresSynchronousInitialization_ ), requiresSynchronousInitialization );
349
}
350
351
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
352
353
_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isReactiveMaskTextureEnabled() const
354
{
355
return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isReactiveMaskTextureEnabled ) );
356
}
357
358
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
359
360
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureEnabled( bool enabled )
361
{
362
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureEnabled_ ), enabled );
363
}
364
365
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
366
367
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::reactiveMaskTextureFormat() const
368
{
369
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) );
370
}
371
372
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
373
374
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat )
375
{
376
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureFormat_ ), pixelFormat );
377
}
378
379
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
380
381
_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMinScale() const
382
{
383
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );
384
}
385
386
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
387
388
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMinScale( float scale )
389
{
390
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMinScale_ ), scale );
391
}
392
393
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
394
395
_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMaxScale() const
396
{
397
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );
398
}
399
400
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
401
402
_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMaxScale( float scale )
403
{
404
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMaxScale_ ), scale );
405
}
406
407
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
408
409
_MTLFX_INLINE MTLFX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice ) const
410
{
411
return Object::sendMessage< TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_ ), pDevice );
412
}
413
414
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
415
416
_MTLFX_INLINE MTL4FX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler ) const
417
{
418
return Object::sendMessage< MTL4FX::TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_compiler_ ), pDevice, pCompiler );
419
}
420
421
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
422
423
_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMinScale( const MTL::Device* pDevice )
424
{
425
float scale = 1.0f;
426
427
if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) )
428
{
429
scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice );
430
}
431
432
return scale;
433
}
434
435
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
436
437
_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMaxScale( const MTL::Device* pDevice )
438
{
439
float scale = 1.0f;
440
441
if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) )
442
{
443
scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice );
444
}
445
else if ( supportsDevice( pDevice ) )
446
{
447
scale = 2.0f;
448
}
449
450
return scale;
451
}
452
453
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
454
455
_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsDevice( const MTL::Device* pDevice )
456
{
457
return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice );
458
}
459
460
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
461
462
_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsMetal4FX( const MTL::Device* pDevice )
463
{
464
return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), pDevice );
465
}
466
467
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
468
469
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::colorTextureUsage() const
470
{
471
return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) );
472
}
473
474
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
475
476
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::depthTextureUsage() const
477
{
478
return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) );
479
}
480
481
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
482
483
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::motionTextureUsage() const
484
{
485
return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) );
486
}
487
488
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
489
490
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::outputTextureUsage() const
491
{
492
return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) );
493
}
494
495
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
496
497
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputContentWidth() const
498
{
499
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) );
500
}
501
502
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
503
504
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentWidth( NS::UInteger width )
505
{
506
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentWidth_ ), width );
507
}
508
509
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
510
511
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputContentHeight() const
512
{
513
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) );
514
}
515
516
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
517
518
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentHeight( NS::UInteger height )
519
{
520
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentHeight_ ), height );
521
}
522
523
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
524
525
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::colorTexture() const
526
{
527
return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) );
528
}
529
530
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
531
532
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setColorTexture( MTL::Texture* pTexture )
533
{
534
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), pTexture );
535
}
536
537
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
538
539
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::depthTexture() const
540
{
541
return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) );
542
}
543
544
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
545
546
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthTexture( MTL::Texture* pTexture )
547
{
548
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), pTexture );
549
}
550
551
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
552
553
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::motionTexture() const
554
{
555
return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) );
556
}
557
558
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
559
560
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionTexture( MTL::Texture* pTexture )
561
{
562
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), pTexture );
563
}
564
565
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
566
567
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::outputTexture() const
568
{
569
return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) );
570
}
571
572
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
573
574
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setOutputTexture( MTL::Texture* pTexture )
575
{
576
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), pTexture );
577
}
578
579
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
580
581
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::exposureTexture() const
582
{
583
return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) );
584
}
585
586
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
587
588
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setExposureTexture( MTL::Texture* pTexture )
589
{
590
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setExposureTexture_ ), pTexture );
591
}
592
593
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
594
595
_MTLFX_INLINE float MTLFX::TemporalScalerBase::preExposure() const
596
{
597
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) );
598
}
599
600
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
601
602
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setPreExposure( float preExposure )
603
{
604
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPreExposure_ ), preExposure );
605
}
606
607
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
608
609
_MTLFX_INLINE float MTLFX::TemporalScalerBase::jitterOffsetX() const
610
{
611
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) );
612
}
613
614
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
615
616
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetX( float offset )
617
{
618
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), offset );
619
}
620
621
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
622
623
_MTLFX_INLINE float MTLFX::TemporalScalerBase::jitterOffsetY() const
624
{
625
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) );
626
}
627
628
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
629
630
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetY( float offset )
631
{
632
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), offset );
633
}
634
635
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
636
637
_MTLFX_INLINE float MTLFX::TemporalScalerBase::motionVectorScaleX() const
638
{
639
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) );
640
}
641
642
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
643
644
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleX( float scale )
645
{
646
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), scale );
647
}
648
649
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
650
651
_MTLFX_INLINE float MTLFX::TemporalScalerBase::motionVectorScaleY() const
652
{
653
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) );
654
}
655
656
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
657
658
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleY( float scale )
659
{
660
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), scale );
661
}
662
663
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
664
665
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::reactiveMaskTexture() const
666
{
667
return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTexture ) );
668
}
669
670
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
671
672
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture )
673
{
674
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTexture_ ), reactiveMaskTexture );
675
}
676
677
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
678
679
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::reactiveTextureUsage() const
680
{
681
return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveTextureUsage ) );
682
}
683
684
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
685
686
_MTLFX_INLINE bool MTLFX::TemporalScalerBase::reset() const
687
{
688
return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( reset ) );
689
}
690
691
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
692
693
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReset( bool reset )
694
{
695
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReset_ ), reset );
696
}
697
698
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
699
700
_MTLFX_INLINE bool MTLFX::TemporalScalerBase::isDepthReversed() const
701
{
702
return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) );
703
}
704
705
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
706
707
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthReversed( bool depthReversed )
708
{
709
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed );
710
}
711
712
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
713
714
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::colorTextureFormat() const
715
{
716
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );
717
}
718
719
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
720
721
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::depthTextureFormat() const
722
{
723
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );
724
}
725
726
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
727
728
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::motionTextureFormat() const
729
{
730
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );
731
}
732
733
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
734
735
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::outputTextureFormat() const
736
{
737
return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );
738
}
739
740
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
741
742
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputWidth() const
743
{
744
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );
745
}
746
747
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
748
749
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputHeight() const
750
{
751
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );
752
}
753
754
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
755
756
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::outputWidth() const
757
{
758
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );
759
}
760
761
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
762
763
_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::outputHeight() const
764
{
765
return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );
766
}
767
768
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
769
770
_MTLFX_INLINE float MTLFX::TemporalScalerBase::inputContentMinScale() const
771
{
772
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );
773
}
774
775
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
776
777
_MTLFX_INLINE float MTLFX::TemporalScalerBase::inputContentMaxScale() const
778
{
779
return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );
780
}
781
782
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
783
784
_MTLFX_INLINE MTL::Fence* MTLFX::TemporalScalerBase::fence() const
785
{
786
return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) );
787
}
788
789
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
790
791
_MTLFX_INLINE void MTLFX::TemporalScalerBase::setFence( MTL::Fence* pFence )
792
{
793
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), pFence );
794
}
795
796
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
797
798
_MTLFX_INLINE void MTLFX::TemporalScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer )
799
{
800
Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer );
801
}
802
803
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
804
805