Path: blob/master/thirdparty/metal-cpp/MetalFX/MTLFXTemporalScaler.hpp
21425 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// MetalFX/MTLFXTemporalScaler.hpp3//4// Copyright 2020-2025 Apple Inc.5//6// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.17//18//-------------------------------------------------------------------------------------------------------------------------------------------------------------1920#pragma once2122//-------------------------------------------------------------------------------------------------------------------------------------------------------------2324#include "MTLFXDefines.hpp"25#include "MTLFXPrivate.hpp"2627#include "../Metal/Metal.hpp"2829//-------------------------------------------------------------------------------------------------------------------------------------------------------------3031namespace MTL4FX32{33class TemporalScaler;34}3536namespace MTLFX37{38class TemporalScalerDescriptor : public NS::Copying< TemporalScalerDescriptor >39{40public:41static class TemporalScalerDescriptor* alloc();42class TemporalScalerDescriptor* init();4344MTL::PixelFormat colorTextureFormat() const;45void setColorTextureFormat( MTL::PixelFormat format );4647MTL::PixelFormat depthTextureFormat() const;48void setDepthTextureFormat( MTL::PixelFormat format );4950MTL::PixelFormat motionTextureFormat() const;51void setMotionTextureFormat( MTL::PixelFormat format );5253MTL::PixelFormat outputTextureFormat() const;54void setOutputTextureFormat( MTL::PixelFormat format );5556NS::UInteger inputWidth() const;57void setInputWidth( NS::UInteger width );5859NS::UInteger inputHeight() const;60void setInputHeight( NS::UInteger height );6162NS::UInteger outputWidth() const;63void setOutputWidth( NS::UInteger width );6465NS::UInteger outputHeight() const;66void setOutputHeight( NS::UInteger height );6768bool isAutoExposureEnabled() const;69void setAutoExposureEnabled( bool enabled );7071bool isInputContentPropertiesEnabled() const;72void setInputContentPropertiesEnabled( bool enabled );7374bool requiresSynchronousInitialization() const;75void setRequiresSynchronousInitialization(bool requiresSynchronousInitialization);7677bool isReactiveMaskTextureEnabled() const;78void setReactiveMaskTextureEnabled( bool enabled );7980MTL::PixelFormat reactiveMaskTextureFormat() const;81void setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat );8283float inputContentMinScale() const;84void setInputContentMinScale( float scale );8586float inputContentMaxScale() const;87void setInputContentMaxScale( float scale );8889class TemporalScaler* newTemporalScaler( const MTL::Device* pDevice ) const;90MTL4FX::TemporalScaler* newTemporalScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler) const;9192static float supportedInputContentMinScale( const MTL::Device* pDevice );93static float supportedInputContentMaxScale( const MTL::Device* pDevice );9495static bool supportsDevice( const MTL::Device* pDevice );96static bool supportsMetal4FX( const MTL::Device* pDevice );97};9899class FrameInterpolatableScaler : public NS::Copying< FrameInterpolatableScaler >100{101};102103class TemporalScalerBase : public NS::Referencing< TemporalScaler, FrameInterpolatableScaler >104{105public:106MTL::TextureUsage colorTextureUsage() const;107MTL::TextureUsage depthTextureUsage() const;108MTL::TextureUsage motionTextureUsage() const;109MTL::TextureUsage outputTextureUsage() const;110111NS::UInteger inputContentWidth() const;112void setInputContentWidth( NS::UInteger width );113114NS::UInteger inputContentHeight() const;115void setInputContentHeight( NS::UInteger height );116117MTL::Texture* colorTexture() const;118void setColorTexture( MTL::Texture* pTexture );119120MTL::Texture* depthTexture() const;121void setDepthTexture( MTL::Texture* pTexture );122123MTL::Texture* motionTexture() const;124void setMotionTexture( MTL::Texture* pTexture );125126MTL::Texture* outputTexture() const;127void setOutputTexture( MTL::Texture* pTexture );128129MTL::Texture* exposureTexture() const;130void setExposureTexture( MTL::Texture* pTexture );131132float preExposure() const;133void setPreExposure( float preExposure );134135float jitterOffsetX() const;136void setJitterOffsetX( float offset );137138float jitterOffsetY() const;139void setJitterOffsetY( float offset );140141float motionVectorScaleX() const;142void setMotionVectorScaleX( float scale );143144float motionVectorScaleY() const;145void setMotionVectorScaleY( float scale );146147MTL::Texture* reactiveMaskTexture() const;148void setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture );149150MTL::TextureUsage reactiveTextureUsage() const;151152bool reset() const;153void setReset( bool reset );154155bool isDepthReversed() const;156void setDepthReversed( bool depthReversed );157158MTL::PixelFormat colorTextureFormat() const;159MTL::PixelFormat depthTextureFormat() const;160MTL::PixelFormat motionTextureFormat() const;161MTL::PixelFormat reactiveTextureFormat() const;162MTL::PixelFormat outputTextureFormat() const;163NS::UInteger inputWidth() const;164NS::UInteger inputHeight() const;165NS::UInteger outputWidth() const;166NS::UInteger outputHeight() const;167float inputContentMinScale() const;168float inputContentMaxScale() const;169170MTL::Fence* fence() const;171void setFence( MTL::Fence* pFence );172};173174class TemporalScaler : public NS::Referencing< TemporalScaler, TemporalScalerBase >175{176public:177void encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer );178};179}180181//-------------------------------------------------------------------------------------------------------------------------------------------------------------182183_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::alloc()184{185return NS::Object::alloc< TemporalScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ) );186}187188//-------------------------------------------------------------------------------------------------------------------------------------------------------------189190_MTLFX_INLINE MTLFX::TemporalScalerDescriptor* MTLFX::TemporalScalerDescriptor::init()191{192return NS::Object::init< TemporalScalerDescriptor >();193}194195//-------------------------------------------------------------------------------------------------------------------------------------------------------------196197_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::colorTextureFormat() const198{199return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );200}201202//-------------------------------------------------------------------------------------------------------------------------------------------------------------203204_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setColorTextureFormat( MTL::PixelFormat format )205{206Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), format );207}208209//-------------------------------------------------------------------------------------------------------------------------------------------------------------210211_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::depthTextureFormat() const212{213return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );214}215216//-------------------------------------------------------------------------------------------------------------------------------------------------------------217218_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat format )219{220Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), format );221}222223//-------------------------------------------------------------------------------------------------------------------------------------------------------------224225_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::motionTextureFormat() const226{227return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );228}229230//-------------------------------------------------------------------------------------------------------------------------------------------------------------231232_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat format )233{234Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), format );235}236237//-------------------------------------------------------------------------------------------------------------------------------------------------------------238239_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::outputTextureFormat() const240{241return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );242}243244//-------------------------------------------------------------------------------------------------------------------------------------------------------------245246_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat format )247{248Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), format );249}250251//-------------------------------------------------------------------------------------------------------------------------------------------------------------252253_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputWidth() const254{255return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );256}257258//-------------------------------------------------------------------------------------------------------------------------------------------------------------259260_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputWidth( NS::UInteger width )261{262Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), width );263}264265//-------------------------------------------------------------------------------------------------------------------------------------------------------------266267_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::inputHeight() const268{269return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );270}271272//-------------------------------------------------------------------------------------------------------------------------------------------------------------273274_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputHeight( NS::UInteger height )275{276Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), height );277}278279//-------------------------------------------------------------------------------------------------------------------------------------------------------------280281_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputWidth() const282{283return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );284}285286//-------------------------------------------------------------------------------------------------------------------------------------------------------------287288_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputWidth( NS::UInteger width )289{290Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), width );291}292293//-------------------------------------------------------------------------------------------------------------------------------------------------------------294295_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerDescriptor::outputHeight() const296{297return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );298}299300//-------------------------------------------------------------------------------------------------------------------------------------------------------------301302_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setOutputHeight( NS::UInteger height )303{304Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), height );305}306307//-------------------------------------------------------------------------------------------------------------------------------------------------------------308309_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isAutoExposureEnabled() const310{311return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) );312}313314//-------------------------------------------------------------------------------------------------------------------------------------------------------------315316_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setAutoExposureEnabled( bool enabled )317{318Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled );319}320321//-------------------------------------------------------------------------------------------------------------------------------------------------------------322323_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isInputContentPropertiesEnabled() const324{325return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) );326}327328//-------------------------------------------------------------------------------------------------------------------------------------------------------------329330_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentPropertiesEnabled( bool enabled )331{332Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled );333}334335336//-------------------------------------------------------------------------------------------------------------------------------------------------------------337338_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::requiresSynchronousInitialization() const339{340return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( requiresSynchronousInitialization ) );341}342343//-------------------------------------------------------------------------------------------------------------------------------------------------------------344345_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setRequiresSynchronousInitialization(bool requiresSynchronousInitialization)346{347Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRequiresSynchronousInitialization_ ), requiresSynchronousInitialization );348}349350//-------------------------------------------------------------------------------------------------------------------------------------------------------------351352_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::isReactiveMaskTextureEnabled() const353{354return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isReactiveMaskTextureEnabled ) );355}356357//-------------------------------------------------------------------------------------------------------------------------------------------------------------358359_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureEnabled( bool enabled )360{361Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureEnabled_ ), enabled );362}363364//-------------------------------------------------------------------------------------------------------------------------------------------------------------365366_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerDescriptor::reactiveMaskTextureFormat() const367{368return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) );369}370371//-------------------------------------------------------------------------------------------------------------------------------------------------------------372373_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat )374{375Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureFormat_ ), pixelFormat );376}377378//-------------------------------------------------------------------------------------------------------------------------------------------------------------379380_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMinScale() const381{382return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );383}384385//-------------------------------------------------------------------------------------------------------------------------------------------------------------386387_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMinScale( float scale )388{389Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMinScale_ ), scale );390}391392//-------------------------------------------------------------------------------------------------------------------------------------------------------------393394_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::inputContentMaxScale() const395{396return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );397}398399//-------------------------------------------------------------------------------------------------------------------------------------------------------------400401_MTLFX_INLINE void MTLFX::TemporalScalerDescriptor::setInputContentMaxScale( float scale )402{403Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMaxScale_ ), scale );404}405406//-------------------------------------------------------------------------------------------------------------------------------------------------------------407408_MTLFX_INLINE MTLFX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice ) const409{410return Object::sendMessage< TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_ ), pDevice );411}412413//-------------------------------------------------------------------------------------------------------------------------------------------------------------414415_MTLFX_INLINE MTL4FX::TemporalScaler* MTLFX::TemporalScalerDescriptor::newTemporalScaler( const MTL::Device* pDevice, const MTL4::Compiler* pCompiler ) const416{417return Object::sendMessage< MTL4FX::TemporalScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalScalerWithDevice_compiler_ ), pDevice, pCompiler );418}419420//-------------------------------------------------------------------------------------------------------------------------------------------------------------421422_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMinScale( const MTL::Device* pDevice )423{424float scale = 1.0f;425426if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) )427{428scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice );429}430431return scale;432}433434//-------------------------------------------------------------------------------------------------------------------------------------------------------------435436_MTLFX_INLINE float MTLFX::TemporalScalerDescriptor::supportedInputContentMaxScale( const MTL::Device* pDevice )437{438float scale = 1.0f;439440if ( nullptr != methodSignatureForSelector( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) )441{442scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice );443}444else if ( supportsDevice( pDevice ) )445{446scale = 2.0f;447}448449return scale;450}451452//-------------------------------------------------------------------------------------------------------------------------------------------------------------453454_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsDevice( const MTL::Device* pDevice )455{456return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsDevice_ ), pDevice );457}458459//-------------------------------------------------------------------------------------------------------------------------------------------------------------460461_MTLFX_INLINE bool MTLFX::TemporalScalerDescriptor::supportsMetal4FX( const MTL::Device* pDevice )462{463return Object::sendMessageSafe< bool >( _NS_PRIVATE_CLS( MTLFXTemporalScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), pDevice );464}465466//-------------------------------------------------------------------------------------------------------------------------------------------------------------467468_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::colorTextureUsage() const469{470return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) );471}472473//-------------------------------------------------------------------------------------------------------------------------------------------------------------474475_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::depthTextureUsage() const476{477return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) );478}479480//-------------------------------------------------------------------------------------------------------------------------------------------------------------481482_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::motionTextureUsage() const483{484return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) );485}486487//-------------------------------------------------------------------------------------------------------------------------------------------------------------488489_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::outputTextureUsage() const490{491return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) );492}493494//-------------------------------------------------------------------------------------------------------------------------------------------------------------495496_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputContentWidth() const497{498return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentWidth ) );499}500501//-------------------------------------------------------------------------------------------------------------------------------------------------------------502503_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentWidth( NS::UInteger width )504{505Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentWidth_ ), width );506}507508//-------------------------------------------------------------------------------------------------------------------------------------------------------------509510_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputContentHeight() const511{512return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputContentHeight ) );513}514515//-------------------------------------------------------------------------------------------------------------------------------------------------------------516517_MTLFX_INLINE void MTLFX::TemporalScalerBase::setInputContentHeight( NS::UInteger height )518{519Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentHeight_ ), height );520}521522//-------------------------------------------------------------------------------------------------------------------------------------------------------------523524_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::colorTexture() const525{526return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) );527}528529//-------------------------------------------------------------------------------------------------------------------------------------------------------------530531_MTLFX_INLINE void MTLFX::TemporalScalerBase::setColorTexture( MTL::Texture* pTexture )532{533Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), pTexture );534}535536//-------------------------------------------------------------------------------------------------------------------------------------------------------------537538_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::depthTexture() const539{540return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) );541}542543//-------------------------------------------------------------------------------------------------------------------------------------------------------------544545_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthTexture( MTL::Texture* pTexture )546{547Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), pTexture );548}549550//-------------------------------------------------------------------------------------------------------------------------------------------------------------551552_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::motionTexture() const553{554return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) );555}556557//-------------------------------------------------------------------------------------------------------------------------------------------------------------558559_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionTexture( MTL::Texture* pTexture )560{561Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), pTexture );562}563564//-------------------------------------------------------------------------------------------------------------------------------------------------------------565566_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::outputTexture() const567{568return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) );569}570571//-------------------------------------------------------------------------------------------------------------------------------------------------------------572573_MTLFX_INLINE void MTLFX::TemporalScalerBase::setOutputTexture( MTL::Texture* pTexture )574{575Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), pTexture );576}577578//-------------------------------------------------------------------------------------------------------------------------------------------------------------579580_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::exposureTexture() const581{582return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) );583}584585//-------------------------------------------------------------------------------------------------------------------------------------------------------------586587_MTLFX_INLINE void MTLFX::TemporalScalerBase::setExposureTexture( MTL::Texture* pTexture )588{589Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setExposureTexture_ ), pTexture );590}591592//-------------------------------------------------------------------------------------------------------------------------------------------------------------593594_MTLFX_INLINE float MTLFX::TemporalScalerBase::preExposure() const595{596return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) );597}598599//-------------------------------------------------------------------------------------------------------------------------------------------------------------600601_MTLFX_INLINE void MTLFX::TemporalScalerBase::setPreExposure( float preExposure )602{603Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPreExposure_ ), preExposure );604}605606//-------------------------------------------------------------------------------------------------------------------------------------------------------------607608_MTLFX_INLINE float MTLFX::TemporalScalerBase::jitterOffsetX() const609{610return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) );611}612613//-------------------------------------------------------------------------------------------------------------------------------------------------------------614615_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetX( float offset )616{617Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), offset );618}619620//-------------------------------------------------------------------------------------------------------------------------------------------------------------621622_MTLFX_INLINE float MTLFX::TemporalScalerBase::jitterOffsetY() const623{624return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) );625}626627//-------------------------------------------------------------------------------------------------------------------------------------------------------------628629_MTLFX_INLINE void MTLFX::TemporalScalerBase::setJitterOffsetY( float offset )630{631Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), offset );632}633634//-------------------------------------------------------------------------------------------------------------------------------------------------------------635636_MTLFX_INLINE float MTLFX::TemporalScalerBase::motionVectorScaleX() const637{638return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) );639}640641//-------------------------------------------------------------------------------------------------------------------------------------------------------------642643_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleX( float scale )644{645Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), scale );646}647648//-------------------------------------------------------------------------------------------------------------------------------------------------------------649650_MTLFX_INLINE float MTLFX::TemporalScalerBase::motionVectorScaleY() const651{652return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) );653}654655//-------------------------------------------------------------------------------------------------------------------------------------------------------------656657_MTLFX_INLINE void MTLFX::TemporalScalerBase::setMotionVectorScaleY( float scale )658{659Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), scale );660}661662//-------------------------------------------------------------------------------------------------------------------------------------------------------------663664_MTLFX_INLINE MTL::Texture* MTLFX::TemporalScalerBase::reactiveMaskTexture() const665{666return Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTexture ) );667}668669//-------------------------------------------------------------------------------------------------------------------------------------------------------------670671_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture )672{673Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTexture_ ), reactiveMaskTexture );674}675676//-------------------------------------------------------------------------------------------------------------------------------------------------------------677678_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalScalerBase::reactiveTextureUsage() const679{680return Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveTextureUsage ) );681}682683//-------------------------------------------------------------------------------------------------------------------------------------------------------------684685_MTLFX_INLINE bool MTLFX::TemporalScalerBase::reset() const686{687return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( reset ) );688}689690//-------------------------------------------------------------------------------------------------------------------------------------------------------------691692_MTLFX_INLINE void MTLFX::TemporalScalerBase::setReset( bool reset )693{694Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReset_ ), reset );695}696697//-------------------------------------------------------------------------------------------------------------------------------------------------------------698699_MTLFX_INLINE bool MTLFX::TemporalScalerBase::isDepthReversed() const700{701return Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) );702}703704//-------------------------------------------------------------------------------------------------------------------------------------------------------------705706_MTLFX_INLINE void MTLFX::TemporalScalerBase::setDepthReversed( bool depthReversed )707{708Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed );709}710711//-------------------------------------------------------------------------------------------------------------------------------------------------------------712713_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::colorTextureFormat() const714{715return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );716}717718//-------------------------------------------------------------------------------------------------------------------------------------------------------------719720_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::depthTextureFormat() const721{722return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );723}724725//-------------------------------------------------------------------------------------------------------------------------------------------------------------726727_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::motionTextureFormat() const728{729return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );730}731732//-------------------------------------------------------------------------------------------------------------------------------------------------------------733734_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalScalerBase::outputTextureFormat() const735{736return Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );737}738739//-------------------------------------------------------------------------------------------------------------------------------------------------------------740741_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputWidth() const742{743return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );744}745746//-------------------------------------------------------------------------------------------------------------------------------------------------------------747748_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::inputHeight() const749{750return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );751}752753//-------------------------------------------------------------------------------------------------------------------------------------------------------------754755_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::outputWidth() const756{757return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );758}759760//-------------------------------------------------------------------------------------------------------------------------------------------------------------761762_MTLFX_INLINE NS::UInteger MTLFX::TemporalScalerBase::outputHeight() const763{764return Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );765}766767//-------------------------------------------------------------------------------------------------------------------------------------------------------------768769_MTLFX_INLINE float MTLFX::TemporalScalerBase::inputContentMinScale() const770{771return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );772}773774//-------------------------------------------------------------------------------------------------------------------------------------------------------------775776_MTLFX_INLINE float MTLFX::TemporalScalerBase::inputContentMaxScale() const777{778return Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );779}780781//-------------------------------------------------------------------------------------------------------------------------------------------------------------782783_MTLFX_INLINE MTL::Fence* MTLFX::TemporalScalerBase::fence() const784{785return Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) );786}787788//-------------------------------------------------------------------------------------------------------------------------------------------------------------789790_MTLFX_INLINE void MTLFX::TemporalScalerBase::setFence( MTL::Fence* pFence )791{792Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), pFence );793}794795//-------------------------------------------------------------------------------------------------------------------------------------------------------------796797_MTLFX_INLINE void MTLFX::TemporalScaler::encodeToCommandBuffer( MTL::CommandBuffer* pCommandBuffer )798{799Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), pCommandBuffer );800}801802//-------------------------------------------------------------------------------------------------------------------------------------------------------------803804805