Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/MetalFX/MTLFXTemporalDenoisedScaler.hpp
21807 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// MetalFX/MTLFXTemporalDenoisedScaler.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
#include <simd/simd.h>
32
33
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
34
35
namespace MTL4FX
36
{
37
class TemporalDenoisedScaler;
38
}
39
40
namespace MTLFX
41
{
42
class TemporalDenoisedScalerDescriptor : public NS::Copying< TemporalDenoisedScalerDescriptor >
43
{
44
public:
45
static class TemporalDenoisedScalerDescriptor* alloc();
46
class TemporalDenoisedScalerDescriptor* init();
47
48
MTL::PixelFormat colorTextureFormat() const;
49
void setColorTextureFormat( MTL::PixelFormat pixelFormat );
50
51
MTL::PixelFormat depthTextureFormat() const;
52
void setDepthTextureFormat( MTL::PixelFormat pixelFormat );
53
54
MTL::PixelFormat motionTextureFormat() const;
55
void setMotionTextureFormat( MTL::PixelFormat pixelFormal );
56
57
MTL::PixelFormat diffuseAlbedoTextureFormat() const;
58
void setDiffuseAlbedoTextureFormat( MTL::PixelFormat pixelFormat );
59
60
MTL::PixelFormat specularAlbedoTextureFormat() const;
61
void setSpecularAlbedoTextureFormat( MTL::PixelFormat pixelFormat );
62
63
MTL::PixelFormat normalTextureFormat() const;
64
void setNormalTextureFormat( MTL::PixelFormat pixelFormat );
65
66
MTL::PixelFormat roughnessTextureFormat() const;
67
void setRoughnessTextureFormat( MTL::PixelFormat pixelFormat );
68
69
MTL::PixelFormat specularHitDistanceTextureFormat() const;
70
void setSpecularHitDistanceTextureFormat( MTL::PixelFormat pixelFormat );
71
72
MTL::PixelFormat denoiseStrengthMaskTextureFormat() const;
73
void setDenoiseStrengthMaskTextureFormat( MTL::PixelFormat pixelFormat );
74
75
MTL::PixelFormat transparencyOverlayTextureFormat() const;
76
void setTransparencyOverlayTextureFormat( MTL::PixelFormat pixelFormat );
77
78
MTL::PixelFormat outputTextureFormat() const;
79
void setOutputTextureFormat( MTL::PixelFormat pixelFormat );
80
81
NS::UInteger inputWidth() const;
82
void setInputWidth( NS::UInteger inputWidth );
83
84
NS::UInteger inputHeight() const;
85
void setInputHeight( NS::UInteger inputHeight );
86
87
NS::UInteger outputWidth() const;
88
void setOutputWidth( NS::UInteger outputWidth );
89
90
NS::UInteger outputHeight() const;
91
void setOutputHeight( NS::UInteger outputHeight );
92
93
bool requiresSynchronousInitialization() const;
94
void setRequiresSynchronousInitialization( bool requiresSynchronousInitialization );
95
96
bool isAutoExposureEnabled() const;
97
void setAutoExposureEnabled( bool enabled );
98
99
bool isInputContentPropertiesEnabled() const;
100
void setInputContentPropertiesEnabled( bool enabled );
101
102
float inputContentMinScale() const;
103
void setInputContentMinScale( float inputContentMinScale );
104
105
float inputContentMaxScale() const;
106
void setInputContentMaxScale( float inputContentMaxScale );
107
108
bool isReactiveMaskTextureEnabled() const;
109
void setReactiveMaskTextureEnabled( bool enabled );
110
111
MTL::PixelFormat reactiveMaskTextureFormat() const;
112
void setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat );
113
114
bool isSpecularHitDistanceTextureEnabled() const;
115
void setSpecularHitDistanceTextureEnabled( bool enabled );
116
117
bool isDenoiseStrengthMaskTextureEnabled() const;
118
void setDenoiseStrengthMaskTextureEnabled( bool enabled );
119
120
bool isTransparencyOverlayTextureEnabled() const;
121
void setTransparencyOverlayTextureEnabled( bool enabled );
122
123
class TemporalDenoisedScaler* newTemporalDenoisedScaler( const MTL::Device* device ) const;
124
MTL4FX::TemporalDenoisedScaler* newTemporalDenoisedScaler( const MTL::Device* device, const MTL4::Compiler* compiler) const;
125
126
static float supportedInputContentMinScale(MTL::Device* device);
127
static float supportedInputContentMaxScale(MTL::Device* device);
128
129
static bool supportsMetal4FX( MTL::Device* device);
130
static bool supportsDevice( MTL::Device* device);
131
};
132
133
class TemporalDenoisedScalerBase : public NS::Referencing< TemporalDenoisedScalerBase, FrameInterpolatableScaler >
134
{
135
public:
136
MTL::TextureUsage colorTextureUsage() const;
137
MTL::TextureUsage depthTextureUsage() const;
138
MTL::TextureUsage motionTextureUsage() const;
139
MTL::TextureUsage reactiveTextureUsage() const;
140
MTL::TextureUsage diffuseAlbedoTextureUsage() const;
141
MTL::TextureUsage specularAlbedoTextureUsage() const;
142
MTL::TextureUsage normalTextureUsage() const;
143
MTL::TextureUsage roughnessTextureUsage() const;
144
MTL::TextureUsage specularHitDistanceTextureUsage() const;
145
MTL::TextureUsage denoiseStrengthMaskTextureUsage() const;
146
MTL::TextureUsage transparencyOverlayTextureUsage() const;
147
MTL::TextureUsage outputTextureUsage() const;
148
149
MTL::Texture* colorTexture() const;
150
void setColorTexture( MTL::Texture* colorTexture );
151
152
MTL::Texture* depthTexture() const;
153
void setDepthTexture( MTL::Texture* depthTexture );
154
155
MTL::Texture* motionTexture() const;
156
void setMotionTexture( MTL::Texture* motionTexture );
157
158
MTL::Texture* diffuseAlbedoTexture() const;
159
void setDiffuseAlbedoTexture( MTL::Texture* diffuseAlbedoTexture );
160
161
MTL::Texture* specularAlbedoTexture() const;
162
void setSpecularAlbedoTexture( MTL::Texture* specularAlbedoTexture );
163
164
MTL::Texture* normalTexture() const;
165
void setNormalTexture( MTL::Texture* normalTexture );
166
167
MTL::Texture* roughnessTexture() const;
168
void setRoughnessTexture( MTL::Texture* roughnessTexture );
169
170
MTL::Texture* specularHitDistanceTexture() const;
171
void setSpecularHitDistanceTexture( MTL::Texture* specularHitDistanceTexture );
172
173
MTL::Texture* denoiseStrengthMaskTexture() const;
174
void setDenoiseStrengthMaskTexture( MTL::Texture* denoiseStrengthMaskTexture );
175
176
MTL::Texture* transparencyOverlayTexture() const;
177
void setTransparencyOverlayTexture( MTL::Texture* transparencyOverlayTexture );
178
179
MTL::Texture* outputTexture() const;
180
void setOutputTexture( MTL::Texture* outputTexture );
181
182
MTL::Texture* exposureTexture() const;
183
void setExposureTexture( MTL::Texture* exposureTexture );
184
185
float preExposure() const;
186
void setPreExposure( float preExposure );
187
188
MTL::Texture* reactiveMaskTexture() const;
189
void setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture );
190
191
float jitterOffsetX() const;
192
void setJitterOffsetX( float jitterOffsetX );
193
194
float jitterOffsetY() const;
195
void setJitterOffsetY( float jitterOffsetY );
196
197
float motionVectorScaleX() const;
198
void setMotionVectorScaleX( float motionVectorScaleX );
199
200
float motionVectorScaleY() const;
201
void setMotionVectorScaleY( float motionVectorScaleY );
202
203
bool shouldResetHistory() const;
204
void setShouldResetHistory( bool shouldResetHistory );
205
206
bool isDepthReversed() const;
207
void setDepthReversed( bool depthReversed );
208
209
MTL::PixelFormat colorTextureFormat() const;
210
MTL::PixelFormat depthTextureFormat() const;
211
MTL::PixelFormat motionTextureFormat() const;
212
MTL::PixelFormat diffuseAlbedoTextureFormat() const;
213
MTL::PixelFormat specularAlbedoTextureFormat() const;
214
MTL::PixelFormat normalTextureFormat() const;
215
MTL::PixelFormat roughnessTextureFormat() const;
216
MTL::PixelFormat specularHitDistanceTextureFormat() const;
217
MTL::PixelFormat denoiseStrengthMaskTextureFormat() const;
218
MTL::PixelFormat transparencyOverlayTextureFormat() const;
219
MTL::PixelFormat reactiveMaskTextureFormat() const;
220
MTL::PixelFormat outputTextureFormat() const;
221
222
NS::UInteger inputWidth() const;
223
NS::UInteger inputHeight() const;
224
NS::UInteger outputWidth() const;
225
NS::UInteger outputHeight() const;
226
float inputContentMinScale() const;
227
float inputContentMaxScale() const;
228
229
simd::float4x4 worldToViewMatrix() const;
230
void setWorldToViewMatrix( simd::float4x4 worldToViewMatrix );
231
232
simd::float4x4 viewToClipMatrix() const;
233
void setViewToClipMatrix( simd::float4x4 viewToClipMatrix );
234
235
MTL::Fence* fence() const;
236
void setFence( MTL::Fence* fence );
237
};
238
239
class TemporalDenoisedScaler : public NS::Referencing< TemporalDenoisedScaler, TemporalDenoisedScalerBase >
240
{
241
public:
242
243
void encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer);
244
};
245
}
246
247
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
248
249
_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::alloc()
250
{
251
return NS::Object::alloc< TemporalDenoisedScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ) );
252
}
253
254
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
255
256
_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::init()
257
{
258
return NS::Object::init< TemporalDenoisedScalerDescriptor >();
259
}
260
261
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
262
263
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::colorTextureFormat() const
264
{
265
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );
266
}
267
268
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
269
270
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setColorTextureFormat( MTL::PixelFormat pixelFormat )
271
{
272
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), pixelFormat );
273
}
274
275
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
276
277
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::depthTextureFormat() const
278
{
279
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );
280
}
281
282
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
283
284
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat pixelFormat )
285
{
286
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), pixelFormat );
287
}
288
289
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
290
291
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::motionTextureFormat() const
292
{
293
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );
294
}
295
296
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
297
298
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat pixelFormat )
299
{
300
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), pixelFormat );
301
}
302
303
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
304
305
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::diffuseAlbedoTextureFormat() const
306
{
307
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureFormat ) );
308
}
309
310
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
311
312
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDiffuseAlbedoTextureFormat( MTL::PixelFormat pixelFormat )
313
{
314
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDiffuseAlbedoTextureFormat_ ), pixelFormat );
315
}
316
317
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
318
319
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::specularAlbedoTextureFormat() const
320
{
321
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureFormat ) );
322
}
323
324
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
325
326
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularAlbedoTextureFormat( MTL::PixelFormat pixelFormat )
327
{
328
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularAlbedoTextureFormat_ ), pixelFormat );
329
}
330
331
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
332
333
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::normalTextureFormat() const
334
{
335
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( normalTextureFormat ) );
336
}
337
338
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
339
340
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setNormalTextureFormat( MTL::PixelFormat pixelFormat )
341
{
342
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNormalTextureFormat_ ), pixelFormat );
343
}
344
345
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
346
347
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::roughnessTextureFormat() const
348
{
349
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( roughnessTextureFormat ) );
350
}
351
352
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
353
354
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRoughnessTextureFormat( MTL::PixelFormat pixelFormat )
355
{
356
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRoughnessTextureFormat_ ), pixelFormat );
357
}
358
359
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
360
361
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::specularHitDistanceTextureFormat() const
362
{
363
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureFormat ) );
364
}
365
366
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
367
368
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureFormat( MTL::PixelFormat pixelFormat )
369
{
370
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTextureFormat_ ), pixelFormat );
371
}
372
373
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
374
375
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::denoiseStrengthMaskTextureFormat() const
376
{
377
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureFormat ) );
378
}
379
380
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
381
382
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureFormat( MTL::PixelFormat pixelFormat )
383
{
384
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTextureFormat_ ), pixelFormat );
385
}
386
387
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
388
389
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::transparencyOverlayTextureFormat() const
390
{
391
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureFormat ) );
392
}
393
394
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
395
396
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureFormat( MTL::PixelFormat pixelFormat )
397
{
398
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTextureFormat_ ), pixelFormat );
399
}
400
401
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
402
403
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::outputTextureFormat() const
404
{
405
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );
406
}
407
408
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
409
410
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat pixelFormat )
411
{
412
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), pixelFormat );
413
}
414
415
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
416
417
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::inputWidth() const
418
{
419
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );
420
}
421
422
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
423
424
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputWidth( NS::UInteger inputWidth )
425
{
426
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), inputWidth );
427
}
428
429
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
430
431
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::inputHeight() const
432
{
433
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );
434
}
435
436
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
437
438
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputHeight( NS::UInteger inputHeight )
439
{
440
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), inputHeight );
441
}
442
443
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
444
445
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::outputWidth() const
446
{
447
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );
448
}
449
450
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
451
452
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputWidth( NS::UInteger outputWidth )
453
{
454
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), outputWidth );
455
}
456
457
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
458
459
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::outputHeight() const
460
{
461
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );
462
}
463
464
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
465
466
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputHeight( NS::UInteger outputHeight )
467
{
468
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), outputHeight );
469
}
470
471
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
472
473
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::requiresSynchronousInitialization() const
474
{
475
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( requiresSynchronousInitialization ) );
476
}
477
478
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
479
480
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRequiresSynchronousInitialization( bool requiresSynchronousInitialization )
481
{
482
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRequiresSynchronousInitialization_ ), requiresSynchronousInitialization );
483
}
484
485
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
486
487
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isAutoExposureEnabled() const
488
{
489
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) );
490
}
491
492
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
493
494
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setAutoExposureEnabled( bool enabled )
495
{
496
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled );
497
}
498
499
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
500
501
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isInputContentPropertiesEnabled() const
502
{
503
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) );
504
}
505
506
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
507
508
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentPropertiesEnabled( bool enabled )
509
{
510
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled );
511
}
512
513
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
514
515
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::inputContentMinScale() const
516
{
517
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );
518
}
519
520
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
521
522
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentMinScale( float inputContentMinScale )
523
{
524
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMinScale_ ), inputContentMinScale );
525
}
526
527
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
528
529
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::inputContentMaxScale() const
530
{
531
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );
532
}
533
534
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
535
536
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentMaxScale( float inputContentMaxScale )
537
{
538
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMaxScale_ ), inputContentMaxScale );
539
}
540
541
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
542
543
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isReactiveMaskTextureEnabled() const
544
{
545
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isReactiveMaskTextureEnabled ) );
546
}
547
548
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
549
550
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureEnabled( bool enabled )
551
{
552
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureEnabled_ ), enabled );
553
}
554
555
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
556
557
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::reactiveMaskTextureFormat() const
558
{
559
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) );
560
}
561
562
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
563
564
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat )
565
{
566
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureFormat_ ), pixelFormat );
567
}
568
569
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
570
571
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isSpecularHitDistanceTextureEnabled() const
572
{
573
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isSpecularHitDistanceTextureEnabled ) );
574
}
575
576
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
577
578
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureEnabled( bool enabled )
579
{
580
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTextureEnabled_ ), enabled );
581
}
582
583
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
584
585
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isDenoiseStrengthMaskTextureEnabled() const
586
{
587
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDenoiseStrengthMaskTextureEnabled ) );
588
}
589
590
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
591
592
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureEnabled( bool enabled )
593
{
594
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTextureEnabled_ ), enabled );
595
}
596
597
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
598
599
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isTransparencyOverlayTextureEnabled() const
600
{
601
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isTransparencyOverlayTextureEnabled ) );
602
}
603
604
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
605
606
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureEnabled( bool enabled )
607
{
608
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTextureEnabled_ ), enabled );
609
}
610
611
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
612
613
_MTLFX_INLINE MTLFX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler( const MTL::Device* device ) const
614
{
615
return NS::Object::sendMessage< TemporalDenoisedScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalDenoisedScalerWithDevice_ ), device );
616
}
617
618
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
619
620
_MTLFX_INLINE MTL4FX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler( const MTL::Device* device, const MTL4::Compiler* compiler ) const
621
{
622
return NS::Object::sendMessage< MTL4FX::TemporalDenoisedScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalDenoisedScalerWithDevice_compiler_ ), device, compiler );
623
}
624
625
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
626
627
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMinScale( MTL::Device* pDevice )
628
{
629
float scale = 1.0f;
630
631
if ( nullptr != methodSignatureForSelector( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) )
632
{
633
scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice );
634
}
635
636
return scale;
637
}
638
639
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
640
641
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMaxScale( MTL::Device* pDevice )
642
{
643
float scale = 1.0f;
644
645
if ( nullptr != methodSignatureForSelector( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) )
646
{
647
scale = sendMessage< float >( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice );
648
}
649
else if ( supportsDevice( pDevice ) )
650
{
651
scale = 2.0f;
652
}
653
654
return scale;
655
}
656
657
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
658
659
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsMetal4FX( MTL::Device* device )
660
{
661
return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXTemporalDenoisedScalerDescriptor), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), device );
662
}
663
664
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
665
666
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsDevice( MTL::Device* device )
667
{
668
return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXTemporalDenoisedScalerDescriptor), _MTLFX_PRIVATE_SEL( supportsDevice_ ), device );
669
}
670
671
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
672
673
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::colorTextureUsage() const
674
{
675
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) );
676
}
677
678
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
679
680
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::depthTextureUsage() const
681
{
682
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) );
683
}
684
685
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
686
687
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::motionTextureUsage() const
688
{
689
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) );
690
}
691
692
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
693
694
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::reactiveTextureUsage() const
695
{
696
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveTextureUsage ) );
697
}
698
699
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
700
701
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTextureUsage() const
702
{
703
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureUsage ) );
704
}
705
706
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
707
708
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::specularAlbedoTextureUsage() const
709
{
710
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureUsage ) );
711
}
712
713
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
714
715
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::normalTextureUsage() const
716
{
717
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( normalTextureUsage ) );
718
}
719
720
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
721
722
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::roughnessTextureUsage() const
723
{
724
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( roughnessTextureUsage ) );
725
}
726
727
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
728
729
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTextureUsage() const
730
{
731
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureUsage ) );
732
}
733
734
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
735
736
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTextureUsage() const
737
{
738
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureUsage ) );
739
}
740
741
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
742
743
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTextureUsage() const
744
{
745
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureUsage ) );
746
}
747
748
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
749
750
_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::outputTextureUsage() const
751
{
752
return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) );
753
}
754
755
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
756
757
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::colorTexture() const
758
{
759
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) );
760
}
761
762
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
763
764
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setColorTexture( MTL::Texture* colorTexture )
765
{
766
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), colorTexture );
767
}
768
769
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
770
771
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::depthTexture() const
772
{
773
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) );
774
}
775
776
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
777
778
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthTexture( MTL::Texture* depthTexture )
779
{
780
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), depthTexture );
781
}
782
783
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
784
785
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::motionTexture() const
786
{
787
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) );
788
}
789
790
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
791
792
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionTexture( MTL::Texture* motionTexture )
793
{
794
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), motionTexture );
795
}
796
797
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
798
799
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTexture() const
800
{
801
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTexture ) );
802
}
803
804
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
805
806
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDiffuseAlbedoTexture( MTL::Texture* diffuseAlbedoTexture )
807
{
808
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDiffuseAlbedoTexture_ ), diffuseAlbedoTexture );
809
}
810
811
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
812
813
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::specularAlbedoTexture() const
814
{
815
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTexture ) );
816
}
817
818
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
819
820
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularAlbedoTexture( MTL::Texture* specularAlbedoTexture )
821
{
822
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularAlbedoTexture_ ), specularAlbedoTexture );
823
}
824
825
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
826
827
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::normalTexture() const
828
{
829
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( normalTexture ) );
830
}
831
832
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
833
834
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setNormalTexture( MTL::Texture* normalTexture )
835
{
836
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNormalTexture_ ), normalTexture );
837
}
838
839
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
840
841
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::roughnessTexture() const
842
{
843
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( roughnessTexture ) );
844
}
845
846
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
847
848
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setRoughnessTexture( MTL::Texture* roughnessTexture )
849
{
850
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRoughnessTexture_ ), roughnessTexture );
851
}
852
853
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
854
855
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTexture() const
856
{
857
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTexture ) );
858
}
859
860
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
861
862
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularHitDistanceTexture( MTL::Texture* specularHitDistanceTexture )
863
{
864
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTexture_ ), specularHitDistanceTexture );
865
}
866
867
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
868
869
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTexture() const
870
{
871
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTexture ) );
872
}
873
874
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
875
876
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDenoiseStrengthMaskTexture( MTL::Texture* denoiseStrengthMaskTexture )
877
{
878
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTexture_ ), denoiseStrengthMaskTexture );
879
}
880
881
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
882
883
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTexture() const
884
{
885
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTexture ) );
886
}
887
888
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
889
890
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setTransparencyOverlayTexture( MTL::Texture* transparencyOverlayTexture )
891
{
892
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTexture_ ), transparencyOverlayTexture );
893
}
894
895
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
896
897
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::outputTexture() const
898
{
899
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) );
900
}
901
902
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
903
904
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setOutputTexture( MTL::Texture* outputTexture )
905
{
906
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), outputTexture );
907
}
908
909
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
910
911
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::exposureTexture() const
912
{
913
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) );
914
}
915
916
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
917
918
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setExposureTexture( MTL::Texture* exposureTexture )
919
{
920
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setExposureTexture_ ), exposureTexture );
921
}
922
923
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
924
925
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::preExposure() const
926
{
927
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) );
928
}
929
930
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
931
932
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setPreExposure( float preExposure )
933
{
934
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPreExposure_ ), preExposure );
935
}
936
937
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
938
939
_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::reactiveMaskTexture() const
940
{
941
return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTexture ) );
942
}
943
944
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
945
946
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture )
947
{
948
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTexture_ ), reactiveMaskTexture );
949
}
950
951
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
952
953
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::jitterOffsetX() const
954
{
955
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) );
956
}
957
958
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
959
960
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetX( float jitterOffsetX )
961
{
962
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), jitterOffsetX );
963
}
964
965
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
966
967
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::jitterOffsetY() const
968
{
969
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) );
970
}
971
972
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
973
974
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetY( float jitterOffsetY )
975
{
976
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), jitterOffsetY );
977
}
978
979
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
980
981
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::motionVectorScaleX() const
982
{
983
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) );
984
}
985
986
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
987
988
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleX( float motionVectorScaleX )
989
{
990
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), motionVectorScaleX );
991
}
992
993
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
994
995
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::motionVectorScaleY() const
996
{
997
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) );
998
}
999
1000
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1001
1002
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleY( float motionVectorScaleY )
1003
{
1004
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), motionVectorScaleY );
1005
}
1006
1007
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1008
1009
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::shouldResetHistory() const
1010
{
1011
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( shouldResetHistory ) );
1012
}
1013
1014
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1015
1016
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setShouldResetHistory( bool shouldResetHistory )
1017
{
1018
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setShouldResetHistory_ ), shouldResetHistory );
1019
}
1020
1021
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1022
1023
_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::isDepthReversed() const
1024
{
1025
return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) );
1026
}
1027
1028
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1029
1030
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthReversed( bool depthReversed )
1031
{
1032
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed );
1033
}
1034
1035
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1036
1037
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::colorTextureFormat() const
1038
{
1039
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );
1040
}
1041
1042
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1043
1044
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::depthTextureFormat() const
1045
{
1046
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );
1047
}
1048
1049
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1050
1051
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::motionTextureFormat() const
1052
{
1053
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );
1054
}
1055
1056
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1057
1058
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTextureFormat() const
1059
{
1060
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureFormat ) );
1061
}
1062
1063
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1064
1065
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::specularAlbedoTextureFormat() const
1066
{
1067
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureFormat ) );
1068
}
1069
1070
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1071
1072
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::normalTextureFormat() const
1073
{
1074
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( normalTextureFormat ) );
1075
}
1076
1077
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1078
1079
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::roughnessTextureFormat() const
1080
{
1081
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( roughnessTextureFormat ) );
1082
}
1083
1084
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1085
1086
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTextureFormat() const
1087
{
1088
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureFormat ) );
1089
}
1090
1091
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1092
1093
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTextureFormat() const
1094
{
1095
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureFormat ) );
1096
}
1097
1098
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1099
1100
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTextureFormat() const
1101
{
1102
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureFormat ) );
1103
}
1104
1105
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1106
1107
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::reactiveMaskTextureFormat() const
1108
{
1109
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) );
1110
}
1111
1112
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1113
1114
_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::outputTextureFormat() const
1115
{
1116
return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );
1117
}
1118
1119
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1120
1121
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::inputWidth() const
1122
{
1123
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );
1124
}
1125
1126
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1127
1128
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::inputHeight() const
1129
{
1130
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );
1131
}
1132
1133
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1134
1135
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::outputWidth() const
1136
{
1137
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );
1138
}
1139
1140
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1141
1142
_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::outputHeight() const
1143
{
1144
return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );
1145
}
1146
1147
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1148
1149
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::inputContentMinScale() const
1150
{
1151
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );
1152
}
1153
1154
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1155
1156
_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::inputContentMaxScale() const
1157
{
1158
return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );
1159
}
1160
1161
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1162
1163
_MTLFX_INLINE simd::float4x4 MTLFX::TemporalDenoisedScalerBase::worldToViewMatrix() const
1164
{
1165
return NS::Object::sendMessage< simd::float4x4 >( this, _MTLFX_PRIVATE_SEL( worldToViewMatrix ) );
1166
}
1167
1168
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1169
1170
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setWorldToViewMatrix( simd::float4x4 worldToViewMatrix )
1171
{
1172
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setWorldToViewMatrix_ ), worldToViewMatrix );
1173
}
1174
1175
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1176
1177
_MTLFX_INLINE simd::float4x4 MTLFX::TemporalDenoisedScalerBase::viewToClipMatrix() const
1178
{
1179
return NS::Object::sendMessage< simd::float4x4 >( this, _MTLFX_PRIVATE_SEL( viewToClipMatrix ) );
1180
}
1181
1182
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1183
1184
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setViewToClipMatrix( simd::float4x4 viewToClipMatrix )
1185
{
1186
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setViewToClipMatrix_ ), viewToClipMatrix );
1187
}
1188
1189
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1190
1191
_MTLFX_INLINE MTL::Fence* MTLFX::TemporalDenoisedScalerBase::fence() const
1192
{
1193
return NS::Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) );
1194
}
1195
1196
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1197
1198
_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setFence( MTL::Fence* fence )
1199
{
1200
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), fence );
1201
}
1202
1203
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
1204
1205
_MTLFX_INLINE void MTLFX::TemporalDenoisedScaler::encodeToCommandBuffer( MTL::CommandBuffer* commandBuffer )
1206
{
1207
return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer );
1208
}
1209
1210