SPB Git

spb/forge Public MIT

Forge — LLM training from scratch in pure C++20 + Metal on Apple Silicon.

C++ 61.2% C 23% Python 7.6% TeX 7.2% CMake 1.1%
66.7 KB · 1,218 lines cpp
Raw Blame History
1//-------------------------------------------------------------------------------------------------------------------------------------------------------------2//3// MetalFX/MTLFXTemporalDenoisedScaler.hpp4//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 at10//11//     http://www.apache.org/licenses/LICENSE-2.012//13// Unless required by applicable law or agreed to in writing, software14// 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 and17// limitations under the License.18//19//-------------------------------------------------------------------------------------------------------------------------------------------------------------2021#pragma once2223//-------------------------------------------------------------------------------------------------------------------------------------------------------------2425#include "MTLFXDefines.hpp"26#include "MTLFXPrivate.hpp"27#include "MTLFXTemporalScaler.hpp"2829#include "../Metal/Metal.hpp"3031#include <simd/simd.h>3233//-------------------------------------------------------------------------------------------------------------------------------------------------------------3435namespace MTL4FX36{37    class TemporalDenoisedScaler;38}3940namespace MTLFX41{42    class TemporalDenoisedScalerDescriptor : public NS::Copying< TemporalDenoisedScalerDescriptor >43    {44        public:45            static class TemporalDenoisedScalerDescriptor*       alloc();46            class TemporalDenoisedScalerDescriptor*              init();4748            MTL::PixelFormat                                     colorTextureFormat() const;49            void                                                 setColorTextureFormat( MTL::PixelFormat pixelFormat );5051            MTL::PixelFormat                                     depthTextureFormat() const;52            void                                                 setDepthTextureFormat( MTL::PixelFormat pixelFormat );5354            MTL::PixelFormat                                     motionTextureFormat() const;55            void                                                 setMotionTextureFormat( MTL::PixelFormat pixelFormal );5657            MTL::PixelFormat                                     diffuseAlbedoTextureFormat() const;58            void                                                 setDiffuseAlbedoTextureFormat( MTL::PixelFormat pixelFormat );5960            MTL::PixelFormat                                     specularAlbedoTextureFormat() const;61            void                                                 setSpecularAlbedoTextureFormat( MTL::PixelFormat pixelFormat );6263            MTL::PixelFormat                                     normalTextureFormat() const;64            void                                                 setNormalTextureFormat( MTL::PixelFormat pixelFormat );6566            MTL::PixelFormat                                     roughnessTextureFormat() const;67            void                                                 setRoughnessTextureFormat( MTL::PixelFormat pixelFormat );6869            MTL::PixelFormat                                     specularHitDistanceTextureFormat() const;70            void                                                 setSpecularHitDistanceTextureFormat( MTL::PixelFormat pixelFormat );7172            MTL::PixelFormat                                     denoiseStrengthMaskTextureFormat() const;73            void                                                 setDenoiseStrengthMaskTextureFormat( MTL::PixelFormat pixelFormat );7475            MTL::PixelFormat                                     transparencyOverlayTextureFormat() const;76            void                                                 setTransparencyOverlayTextureFormat( MTL::PixelFormat pixelFormat );7778            MTL::PixelFormat                                     outputTextureFormat() const;79            void                                                 setOutputTextureFormat( MTL::PixelFormat pixelFormat );8081            NS::UInteger                                         inputWidth() const;82            void                                                 setInputWidth( NS::UInteger inputWidth );8384            NS::UInteger                                         inputHeight() const;85            void                                                 setInputHeight( NS::UInteger inputHeight );8687            NS::UInteger                                         outputWidth() const;88            void                                                 setOutputWidth( NS::UInteger outputWidth );8990            NS::UInteger                                         outputHeight() const;91            void                                                 setOutputHeight( NS::UInteger outputHeight );9293            bool                                                 requiresSynchronousInitialization() const;94            void                                                 setRequiresSynchronousInitialization( bool requiresSynchronousInitialization );9596            bool                                                 isAutoExposureEnabled() const;97            void                                                 setAutoExposureEnabled( bool enabled );9899            bool                                                 isInputContentPropertiesEnabled() const;100            void                                                 setInputContentPropertiesEnabled( bool enabled );101102            float                                                inputContentMinScale() const;103            void                                                 setInputContentMinScale( float inputContentMinScale );104105            float                                                inputContentMaxScale() const;106            void                                                 setInputContentMaxScale( float inputContentMaxScale );107108            bool                                                 isReactiveMaskTextureEnabled() const;109            void                                                 setReactiveMaskTextureEnabled( bool enabled );110111            MTL::PixelFormat                                     reactiveMaskTextureFormat() const;112            void                                                 setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat );113114            bool                                                 isSpecularHitDistanceTextureEnabled() const;115            void                                                 setSpecularHitDistanceTextureEnabled( bool enabled );116117            bool                                                 isDenoiseStrengthMaskTextureEnabled() const;118            void                                                 setDenoiseStrengthMaskTextureEnabled( bool enabled );119120            bool                                                 isTransparencyOverlayTextureEnabled() const;121            void                                                 setTransparencyOverlayTextureEnabled( bool enabled );122123            class TemporalDenoisedScaler*                        newTemporalDenoisedScaler( const MTL::Device* device ) const;124            MTL4FX::TemporalDenoisedScaler*                      newTemporalDenoisedScaler( const MTL::Device* device, const MTL4::Compiler* compiler) const;125126            static float                                         supportedInputContentMinScale(MTL::Device* device);127            static float                                         supportedInputContentMaxScale(MTL::Device* device);128129            static bool                                          supportsMetal4FX( MTL::Device* device);130            static bool                                          supportsDevice( MTL::Device* device);131    };132133    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                                       reactiveMaskTextureUsage() const;140        [[deprecated("use reactiveMaskTextureUsage")]]141        MTL::TextureUsage                                       reactiveTextureUsage() const;142        MTL::TextureUsage                                       diffuseAlbedoTextureUsage() const;143        MTL::TextureUsage                                       specularAlbedoTextureUsage() const;144        MTL::TextureUsage                                       normalTextureUsage() const;145        MTL::TextureUsage                                       roughnessTextureUsage() const;146        MTL::TextureUsage                                       specularHitDistanceTextureUsage() const;147        MTL::TextureUsage                                       denoiseStrengthMaskTextureUsage() const;148        MTL::TextureUsage                                       transparencyOverlayTextureUsage() const;149        MTL::TextureUsage                                       outputTextureUsage() const;150151        MTL::Texture*                                           colorTexture() const;152        void                                                    setColorTexture( MTL::Texture* colorTexture );153154        MTL::Texture*                                           depthTexture() const;155        void                                                    setDepthTexture( MTL::Texture* depthTexture );156157        MTL::Texture*                                           motionTexture() const;158        void                                                    setMotionTexture( MTL::Texture* motionTexture );159160        MTL::Texture*                                           diffuseAlbedoTexture() const;161        void                                                    setDiffuseAlbedoTexture( MTL::Texture* diffuseAlbedoTexture );162163        MTL::Texture*                                           specularAlbedoTexture() const;164        void                                                    setSpecularAlbedoTexture( MTL::Texture* specularAlbedoTexture );165166        MTL::Texture*                                           normalTexture() const;167        void                                                    setNormalTexture( MTL::Texture* normalTexture );168169        MTL::Texture*                                           roughnessTexture() const;170        void                                                    setRoughnessTexture( MTL::Texture* roughnessTexture );171172        MTL::Texture*                                           specularHitDistanceTexture() const;173        void                                                    setSpecularHitDistanceTexture( MTL::Texture* specularHitDistanceTexture );174175        MTL::Texture*                                           denoiseStrengthMaskTexture() const;176        void                                                    setDenoiseStrengthMaskTexture( MTL::Texture* denoiseStrengthMaskTexture );177178        MTL::Texture*                                           transparencyOverlayTexture() const;179        void                                                    setTransparencyOverlayTexture( MTL::Texture* transparencyOverlayTexture );180181        MTL::Texture*                                           outputTexture() const;182        void                                                    setOutputTexture( MTL::Texture* outputTexture );183184        MTL::Texture*                                           exposureTexture() const;185        void                                                    setExposureTexture( MTL::Texture* exposureTexture );186187        float                                                   preExposure() const;188        void                                                    setPreExposure( float preExposure );189190        MTL::Texture*                                           reactiveMaskTexture() const;191        void                                                    setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture );192193        float                                                   jitterOffsetX() const;194        void                                                    setJitterOffsetX( float jitterOffsetX );195196        float                                                   jitterOffsetY() const;197        void                                                    setJitterOffsetY( float jitterOffsetY );198199        float                                                   motionVectorScaleX() const;200        void                                                    setMotionVectorScaleX( float motionVectorScaleX );201202        float                                                   motionVectorScaleY() const;203        void                                                    setMotionVectorScaleY( float motionVectorScaleY );204205        bool                                                    shouldResetHistory() const;206        void                                                    setShouldResetHistory( bool shouldResetHistory );207208        bool                                                    isDepthReversed() const;209        void                                                    setDepthReversed( bool depthReversed );210211        MTL::PixelFormat                                        colorTextureFormat() const;212        MTL::PixelFormat                                        depthTextureFormat() const;213        MTL::PixelFormat                                        motionTextureFormat() const;214        MTL::PixelFormat                                        diffuseAlbedoTextureFormat() const;215        MTL::PixelFormat                                        specularAlbedoTextureFormat() const;216        MTL::PixelFormat                                        normalTextureFormat() const;217        MTL::PixelFormat                                        roughnessTextureFormat() const;218        MTL::PixelFormat                                        specularHitDistanceTextureFormat() const;219        MTL::PixelFormat                                        denoiseStrengthMaskTextureFormat() const;220        MTL::PixelFormat                                        transparencyOverlayTextureFormat() const;221        MTL::PixelFormat                                        reactiveMaskTextureFormat() const;222        MTL::PixelFormat                                        outputTextureFormat() const;223224        NS::UInteger                                            inputWidth() const;225        NS::UInteger                                            inputHeight() const;226        NS::UInteger                                            outputWidth() const;227        NS::UInteger                                            outputHeight() const;228        float                                                   inputContentMinScale() const;229        float                                                   inputContentMaxScale() const;230231        simd::float4x4                                          worldToViewMatrix() const;232        void                                                    setWorldToViewMatrix( simd::float4x4 worldToViewMatrix );233234        simd::float4x4                                          viewToClipMatrix() const;235        void                                                    setViewToClipMatrix( simd::float4x4 viewToClipMatrix );236237        MTL::Fence*                                             fence() const;238        void                                                    setFence( MTL::Fence* fence );239    };240241    class TemporalDenoisedScaler : public NS::Referencing< TemporalDenoisedScaler, TemporalDenoisedScalerBase >242    {243    public:244245        void                                                    encodeToCommandBuffer(MTL::CommandBuffer* commandBuffer);246    };247}248249//-------------------------------------------------------------------------------------------------------------------------------------------------------------250251_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::alloc()252{253    return NS::Object::alloc< TemporalDenoisedScalerDescriptor >( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ) );254}255256//-------------------------------------------------------------------------------------------------------------------------------------------------------------257258_MTLFX_INLINE MTLFX::TemporalDenoisedScalerDescriptor* MTLFX::TemporalDenoisedScalerDescriptor::init()259{260    return NS::Object::init< TemporalDenoisedScalerDescriptor >();261}262263//-------------------------------------------------------------------------------------------------------------------------------------------------------------264265_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::colorTextureFormat() const266{267    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );268}269270//-------------------------------------------------------------------------------------------------------------------------------------------------------------271272_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setColorTextureFormat( MTL::PixelFormat pixelFormat )273{274    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTextureFormat_ ), pixelFormat );275}276277//-------------------------------------------------------------------------------------------------------------------------------------------------------------278279_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::depthTextureFormat() const280{281    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );282}283284//-------------------------------------------------------------------------------------------------------------------------------------------------------------285286_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDepthTextureFormat( MTL::PixelFormat pixelFormat )287{288    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTextureFormat_ ), pixelFormat );289}290291//-------------------------------------------------------------------------------------------------------------------------------------------------------------292293_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::motionTextureFormat() const294{295    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );296}297298//-------------------------------------------------------------------------------------------------------------------------------------------------------------299300_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setMotionTextureFormat( MTL::PixelFormat pixelFormat )301{302    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTextureFormat_ ), pixelFormat );303}304305//-------------------------------------------------------------------------------------------------------------------------------------------------------------306307_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::diffuseAlbedoTextureFormat() const308{309    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureFormat ) );310}311312//-------------------------------------------------------------------------------------------------------------------------------------------------------------313314_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDiffuseAlbedoTextureFormat( MTL::PixelFormat pixelFormat )315{316    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDiffuseAlbedoTextureFormat_ ), pixelFormat );317}318319//-------------------------------------------------------------------------------------------------------------------------------------------------------------320321_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::specularAlbedoTextureFormat() const322{323    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureFormat ) );324}325326//-------------------------------------------------------------------------------------------------------------------------------------------------------------327328_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularAlbedoTextureFormat( MTL::PixelFormat pixelFormat )329{330    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularAlbedoTextureFormat_ ), pixelFormat );331}332333//-------------------------------------------------------------------------------------------------------------------------------------------------------------334335_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::normalTextureFormat() const336{337    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( normalTextureFormat ) );338}339340//-------------------------------------------------------------------------------------------------------------------------------------------------------------341342_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setNormalTextureFormat( MTL::PixelFormat pixelFormat )343{344    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNormalTextureFormat_ ), pixelFormat );345}346347//-------------------------------------------------------------------------------------------------------------------------------------------------------------348349_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::roughnessTextureFormat() const350{351    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( roughnessTextureFormat ) );352}353354//-------------------------------------------------------------------------------------------------------------------------------------------------------------355356_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRoughnessTextureFormat( MTL::PixelFormat pixelFormat )357{358    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRoughnessTextureFormat_ ), pixelFormat );359}360361//-------------------------------------------------------------------------------------------------------------------------------------------------------------362363_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::specularHitDistanceTextureFormat() const364{365    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureFormat ) );366}367368//-------------------------------------------------------------------------------------------------------------------------------------------------------------369370_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureFormat( MTL::PixelFormat pixelFormat )371{372    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTextureFormat_ ), pixelFormat );373}374375//-------------------------------------------------------------------------------------------------------------------------------------------------------------376377_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::denoiseStrengthMaskTextureFormat() const378{379    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureFormat ) );380}381382//-------------------------------------------------------------------------------------------------------------------------------------------------------------383384_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureFormat( MTL::PixelFormat pixelFormat )385{386    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTextureFormat_ ), pixelFormat );387}388389//-------------------------------------------------------------------------------------------------------------------------------------------------------------390391_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::transparencyOverlayTextureFormat() const392{393    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureFormat ) );394}395396//-------------------------------------------------------------------------------------------------------------------------------------------------------------397398_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureFormat( MTL::PixelFormat pixelFormat )399{400    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTextureFormat_ ), pixelFormat );401}402403//-------------------------------------------------------------------------------------------------------------------------------------------------------------404405_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::outputTextureFormat() const406{407    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );408}409410//-------------------------------------------------------------------------------------------------------------------------------------------------------------411412_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputTextureFormat( MTL::PixelFormat pixelFormat )413{414    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTextureFormat_ ), pixelFormat );415}416417//-------------------------------------------------------------------------------------------------------------------------------------------------------------418419_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::inputWidth() const420{421    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );422}423424//-------------------------------------------------------------------------------------------------------------------------------------------------------------425426_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputWidth( NS::UInteger inputWidth )427{428    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputWidth_ ), inputWidth );429}430431//-------------------------------------------------------------------------------------------------------------------------------------------------------------432433_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::inputHeight() const434{435    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );436}437438//-------------------------------------------------------------------------------------------------------------------------------------------------------------439440_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputHeight( NS::UInteger inputHeight )441{442    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputHeight_ ), inputHeight );443}444445//-------------------------------------------------------------------------------------------------------------------------------------------------------------446447_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::outputWidth() const448{449    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );450}451452//-------------------------------------------------------------------------------------------------------------------------------------------------------------453454_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputWidth( NS::UInteger outputWidth )455{456    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputWidth_ ), outputWidth );457}458459//-------------------------------------------------------------------------------------------------------------------------------------------------------------460461_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerDescriptor::outputHeight() const462{463    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );464}465466//-------------------------------------------------------------------------------------------------------------------------------------------------------------467468_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setOutputHeight( NS::UInteger outputHeight )469{470    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputHeight_ ), outputHeight );471}472473//-------------------------------------------------------------------------------------------------------------------------------------------------------------474475_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::requiresSynchronousInitialization() const476{477    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( requiresSynchronousInitialization ) );478}479480//-------------------------------------------------------------------------------------------------------------------------------------------------------------481482_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setRequiresSynchronousInitialization( bool requiresSynchronousInitialization )483{484    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRequiresSynchronousInitialization_ ), requiresSynchronousInitialization );485}486487//-------------------------------------------------------------------------------------------------------------------------------------------------------------488489_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isAutoExposureEnabled() const490{491    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isAutoExposureEnabled ) );492}493494//-------------------------------------------------------------------------------------------------------------------------------------------------------------495496_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setAutoExposureEnabled( bool enabled )497{498    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setAutoExposureEnabled_ ), enabled );499}500501//-------------------------------------------------------------------------------------------------------------------------------------------------------------502503_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isInputContentPropertiesEnabled() const504{505    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isInputContentPropertiesEnabled ) );506}507508//-------------------------------------------------------------------------------------------------------------------------------------------------------------509510_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentPropertiesEnabled( bool enabled )511{512    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentPropertiesEnabled_ ), enabled );513}514515//-------------------------------------------------------------------------------------------------------------------------------------------------------------516517_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::inputContentMinScale() const518{519    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );520}521522//-------------------------------------------------------------------------------------------------------------------------------------------------------------523524_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentMinScale( float inputContentMinScale )525{526    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMinScale_ ), inputContentMinScale );527}528529//-------------------------------------------------------------------------------------------------------------------------------------------------------------530531_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::inputContentMaxScale() const532{533    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );534}535536//-------------------------------------------------------------------------------------------------------------------------------------------------------------537538_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setInputContentMaxScale( float inputContentMaxScale )539{540    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setInputContentMaxScale_ ), inputContentMaxScale );541}542543//-------------------------------------------------------------------------------------------------------------------------------------------------------------544545_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isReactiveMaskTextureEnabled() const546{547    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isReactiveMaskTextureEnabled ) );548}549550//-------------------------------------------------------------------------------------------------------------------------------------------------------------551552_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureEnabled( bool enabled )553{554    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureEnabled_ ), enabled );555}556557//-------------------------------------------------------------------------------------------------------------------------------------------------------------558559_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerDescriptor::reactiveMaskTextureFormat() const560{561    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) );562}563564//-------------------------------------------------------------------------------------------------------------------------------------------------------------565566_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setReactiveMaskTextureFormat( MTL::PixelFormat pixelFormat )567{568    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTextureFormat_ ), pixelFormat );569}570571//-------------------------------------------------------------------------------------------------------------------------------------------------------------572573_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isSpecularHitDistanceTextureEnabled() const574{575    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isSpecularHitDistanceTextureEnabled ) );576}577578//-------------------------------------------------------------------------------------------------------------------------------------------------------------579580_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setSpecularHitDistanceTextureEnabled( bool enabled )581{582    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTextureEnabled_ ), enabled );583}584585//-------------------------------------------------------------------------------------------------------------------------------------------------------------586587_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isDenoiseStrengthMaskTextureEnabled() const588{589    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDenoiseStrengthMaskTextureEnabled ) );590}591592//-------------------------------------------------------------------------------------------------------------------------------------------------------------593594_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setDenoiseStrengthMaskTextureEnabled( bool enabled )595{596    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTextureEnabled_ ), enabled );597}598599//-------------------------------------------------------------------------------------------------------------------------------------------------------------600601_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::isTransparencyOverlayTextureEnabled() const602{603    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isTransparencyOverlayTextureEnabled ) );604}605606//-------------------------------------------------------------------------------------------------------------------------------------------------------------607608_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerDescriptor::setTransparencyOverlayTextureEnabled( bool enabled )609{610    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTextureEnabled_ ), enabled );611}612613//-------------------------------------------------------------------------------------------------------------------------------------------------------------614615_MTLFX_INLINE MTLFX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler( const MTL::Device* device ) const616{617    return NS::Object::sendMessage< TemporalDenoisedScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalDenoisedScalerWithDevice_ ), device );618}619620//-------------------------------------------------------------------------------------------------------------------------------------------------------------621622_MTLFX_INLINE MTL4FX::TemporalDenoisedScaler* MTLFX::TemporalDenoisedScalerDescriptor::newTemporalDenoisedScaler( const MTL::Device* device, const MTL4::Compiler* compiler ) const623{624    return NS::Object::sendMessage< MTL4FX::TemporalDenoisedScaler* >( this, _MTLFX_PRIVATE_SEL( newTemporalDenoisedScalerWithDevice_compiler_ ), device, compiler );625}626627//-------------------------------------------------------------------------------------------------------------------------------------------------------------628629_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMinScale( MTL::Device* pDevice )630{631    float scale = 1.0f;632633    if ( nullptr != methodSignatureForSelector( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ) ) )634    {635        scale = sendMessage< float >( _NS_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMinScaleForDevice_ ), pDevice );636    }637638    return scale;639}640641//-------------------------------------------------------------------------------------------------------------------------------------------------------------642643_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerDescriptor::supportedInputContentMaxScale( MTL::Device* pDevice )644{645    float scale = 1.0f;646647    if ( nullptr != methodSignatureForSelector( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ) ) )648    {649        scale = sendMessage< float >( _MTLFX_PRIVATE_CLS( MTLFXTemporalDenoisedScalerDescriptor ), _MTLFX_PRIVATE_SEL( supportedInputContentMaxScaleForDevice_ ), pDevice );650    }651    else if ( supportsDevice( pDevice ) )652    {653        scale = 2.0f;654    }655656    return scale;657}658659//-------------------------------------------------------------------------------------------------------------------------------------------------------------660661_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsMetal4FX( MTL::Device* device )662{663    return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXTemporalDenoisedScalerDescriptor), _MTLFX_PRIVATE_SEL( supportsMetal4FX_ ), device );664}665666//-------------------------------------------------------------------------------------------------------------------------------------------------------------667668_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerDescriptor::supportsDevice( MTL::Device* device )669{670    return NS::Object::sendMessageSafe< bool >( _MTLFX_PRIVATE_CLS(MTLFXTemporalDenoisedScalerDescriptor), _MTLFX_PRIVATE_SEL( supportsDevice_ ), device );671}672673//-------------------------------------------------------------------------------------------------------------------------------------------------------------674675_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::colorTextureUsage() const676{677    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( colorTextureUsage ) );678}679680//-------------------------------------------------------------------------------------------------------------------------------------------------------------681682_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::depthTextureUsage() const683{684    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( depthTextureUsage ) );685}686687//-------------------------------------------------------------------------------------------------------------------------------------------------------------688689_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::motionTextureUsage() const690{691    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( motionTextureUsage ) );692}693694//-------------------------------------------------------------------------------------------------------------------------------------------------------------695696_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::reactiveTextureUsage() const697{698    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveTextureUsage ) );699}700701//-------------------------------------------------------------------------------------------------------------------------------------------------------------702703_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::reactiveMaskTextureUsage() const704{705    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureUsage ) );706}707708//-------------------------------------------------------------------------------------------------------------------------------------------------------------709710_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTextureUsage() const711{712    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureUsage ) );713}714715//-------------------------------------------------------------------------------------------------------------------------------------------------------------716717_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::specularAlbedoTextureUsage() const718{719    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureUsage ) );720}721722//-------------------------------------------------------------------------------------------------------------------------------------------------------------723724_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::normalTextureUsage() const725{726    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( normalTextureUsage ) );727}728729//-------------------------------------------------------------------------------------------------------------------------------------------------------------730731_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::roughnessTextureUsage() const732{733    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( roughnessTextureUsage ) );734}735736//-------------------------------------------------------------------------------------------------------------------------------------------------------------737738_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTextureUsage() const739{740    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureUsage ) );741}742743//-------------------------------------------------------------------------------------------------------------------------------------------------------------744745_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTextureUsage() const746{747    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureUsage ) );748}749750//-------------------------------------------------------------------------------------------------------------------------------------------------------------751752_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTextureUsage() const753{754    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureUsage ) );755}756757//-------------------------------------------------------------------------------------------------------------------------------------------------------------758759_MTLFX_INLINE MTL::TextureUsage MTLFX::TemporalDenoisedScalerBase::outputTextureUsage() const760{761    return NS::Object::sendMessage< MTL::TextureUsage >( this, _MTLFX_PRIVATE_SEL( outputTextureUsage ) );762}763764//-------------------------------------------------------------------------------------------------------------------------------------------------------------765766_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::colorTexture() const767{768    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( colorTexture ) );769}770771//-------------------------------------------------------------------------------------------------------------------------------------------------------------772773_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setColorTexture( MTL::Texture* colorTexture )774{775    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setColorTexture_ ), colorTexture );776}777778//-------------------------------------------------------------------------------------------------------------------------------------------------------------779780_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::depthTexture() const781{782    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( depthTexture ) );783}784785//-------------------------------------------------------------------------------------------------------------------------------------------------------------786787_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthTexture( MTL::Texture* depthTexture )788{789    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthTexture_ ), depthTexture );790}791792//-------------------------------------------------------------------------------------------------------------------------------------------------------------793794_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::motionTexture() const795{796    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( motionTexture ) );797}798799//-------------------------------------------------------------------------------------------------------------------------------------------------------------800801_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionTexture( MTL::Texture* motionTexture )802{803    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionTexture_ ), motionTexture );804}805806//-------------------------------------------------------------------------------------------------------------------------------------------------------------807808_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTexture() const809{810    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTexture ) );811}812813//-------------------------------------------------------------------------------------------------------------------------------------------------------------814815_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDiffuseAlbedoTexture( MTL::Texture* diffuseAlbedoTexture )816{817    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDiffuseAlbedoTexture_ ), diffuseAlbedoTexture );818}819820//-------------------------------------------------------------------------------------------------------------------------------------------------------------821822_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::specularAlbedoTexture() const823{824    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTexture ) );825}826827//-------------------------------------------------------------------------------------------------------------------------------------------------------------828829_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularAlbedoTexture( MTL::Texture* specularAlbedoTexture )830{831    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularAlbedoTexture_ ), specularAlbedoTexture );832}833834//-------------------------------------------------------------------------------------------------------------------------------------------------------------835836_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::normalTexture() const837{838    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( normalTexture ) );839}840841//-------------------------------------------------------------------------------------------------------------------------------------------------------------842843_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setNormalTexture( MTL::Texture* normalTexture )844{845    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setNormalTexture_ ), normalTexture );846}847848//-------------------------------------------------------------------------------------------------------------------------------------------------------------849850_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::roughnessTexture() const851{852    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( roughnessTexture ) );853}854855//-------------------------------------------------------------------------------------------------------------------------------------------------------------856857_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setRoughnessTexture( MTL::Texture* roughnessTexture )858{859    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setRoughnessTexture_ ), roughnessTexture );860}861862//-------------------------------------------------------------------------------------------------------------------------------------------------------------863864_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTexture() const865{866    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTexture ) );867}868869//-------------------------------------------------------------------------------------------------------------------------------------------------------------870871_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setSpecularHitDistanceTexture( MTL::Texture* specularHitDistanceTexture )872{873    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setSpecularHitDistanceTexture_ ), specularHitDistanceTexture );874}875876//-------------------------------------------------------------------------------------------------------------------------------------------------------------877878_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTexture() const879{880    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTexture ) );881}882883//-------------------------------------------------------------------------------------------------------------------------------------------------------------884885_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDenoiseStrengthMaskTexture( MTL::Texture* denoiseStrengthMaskTexture )886{887    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDenoiseStrengthMaskTexture_ ), denoiseStrengthMaskTexture );888}889890//-------------------------------------------------------------------------------------------------------------------------------------------------------------891892_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTexture() const893{894    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTexture ) );895}896897//-------------------------------------------------------------------------------------------------------------------------------------------------------------898899_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setTransparencyOverlayTexture( MTL::Texture* transparencyOverlayTexture )900{901    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setTransparencyOverlayTexture_ ), transparencyOverlayTexture );902}903904//-------------------------------------------------------------------------------------------------------------------------------------------------------------905906_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::outputTexture() const907{908    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( outputTexture ) );909}910911//-------------------------------------------------------------------------------------------------------------------------------------------------------------912913_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setOutputTexture( MTL::Texture* outputTexture )914{915    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setOutputTexture_ ), outputTexture );916}917918//-------------------------------------------------------------------------------------------------------------------------------------------------------------919920_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::exposureTexture() const921{922    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( exposureTexture ) );923}924925//-------------------------------------------------------------------------------------------------------------------------------------------------------------926927_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setExposureTexture( MTL::Texture* exposureTexture )928{929    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setExposureTexture_ ), exposureTexture );930}931932//-------------------------------------------------------------------------------------------------------------------------------------------------------------933934_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::preExposure() const935{936    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( preExposure ) );937}938939//-------------------------------------------------------------------------------------------------------------------------------------------------------------940941_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setPreExposure( float preExposure )942{943    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setPreExposure_ ), preExposure );944}945946//-------------------------------------------------------------------------------------------------------------------------------------------------------------947948_MTLFX_INLINE MTL::Texture* MTLFX::TemporalDenoisedScalerBase::reactiveMaskTexture() const949{950    return NS::Object::sendMessage< MTL::Texture* >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTexture ) );951}952953//-------------------------------------------------------------------------------------------------------------------------------------------------------------954955_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setReactiveMaskTexture( MTL::Texture* reactiveMaskTexture )956{957    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setReactiveMaskTexture_ ), reactiveMaskTexture );958}959960//-------------------------------------------------------------------------------------------------------------------------------------------------------------961962_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::jitterOffsetX() const963{964    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetX ) );965}966967//-------------------------------------------------------------------------------------------------------------------------------------------------------------968969_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetX( float jitterOffsetX )970{971    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetX_ ), jitterOffsetX );972}973974//-------------------------------------------------------------------------------------------------------------------------------------------------------------975976_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::jitterOffsetY() const977{978    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( jitterOffsetY ) );979}980981//-------------------------------------------------------------------------------------------------------------------------------------------------------------982983_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setJitterOffsetY( float jitterOffsetY )984{985    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setJitterOffsetY_ ), jitterOffsetY );986}987988//-------------------------------------------------------------------------------------------------------------------------------------------------------------989990_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::motionVectorScaleX() const991{992    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleX ) );993}994995//-------------------------------------------------------------------------------------------------------------------------------------------------------------996997_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleX( float motionVectorScaleX )998{999    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleX_ ), motionVectorScaleX );1000}10011002//-------------------------------------------------------------------------------------------------------------------------------------------------------------10031004_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::motionVectorScaleY() const1005{1006    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( motionVectorScaleY ) );1007}10081009//-------------------------------------------------------------------------------------------------------------------------------------------------------------10101011_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setMotionVectorScaleY( float motionVectorScaleY )1012{1013    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setMotionVectorScaleY_ ), motionVectorScaleY );1014}10151016//-------------------------------------------------------------------------------------------------------------------------------------------------------------10171018_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::shouldResetHistory() const1019{1020    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( shouldResetHistory ) );1021}10221023//-------------------------------------------------------------------------------------------------------------------------------------------------------------10241025_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setShouldResetHistory( bool shouldResetHistory )1026{1027    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setShouldResetHistory_ ), shouldResetHistory );1028}10291030//-------------------------------------------------------------------------------------------------------------------------------------------------------------10311032_MTLFX_INLINE bool MTLFX::TemporalDenoisedScalerBase::isDepthReversed() const1033{1034    return NS::Object::sendMessage< bool >( this, _MTLFX_PRIVATE_SEL( isDepthReversed ) );1035}10361037//-------------------------------------------------------------------------------------------------------------------------------------------------------------10381039_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setDepthReversed( bool depthReversed )1040{1041    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setDepthReversed_ ), depthReversed );1042}10431044//-------------------------------------------------------------------------------------------------------------------------------------------------------------10451046_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::colorTextureFormat() const1047{1048    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( colorTextureFormat ) );1049}10501051//-------------------------------------------------------------------------------------------------------------------------------------------------------------10521053_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::depthTextureFormat() const1054{1055    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( depthTextureFormat ) );1056}10571058//-------------------------------------------------------------------------------------------------------------------------------------------------------------10591060_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::motionTextureFormat() const1061{1062    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( motionTextureFormat ) );1063}10641065//-------------------------------------------------------------------------------------------------------------------------------------------------------------10661067_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::diffuseAlbedoTextureFormat() const1068{1069    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( diffuseAlbedoTextureFormat ) );1070}10711072//-------------------------------------------------------------------------------------------------------------------------------------------------------------10731074_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::specularAlbedoTextureFormat() const1075{1076    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularAlbedoTextureFormat ) );1077}10781079//-------------------------------------------------------------------------------------------------------------------------------------------------------------10801081_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::normalTextureFormat() const1082{1083    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( normalTextureFormat ) );1084}10851086//-------------------------------------------------------------------------------------------------------------------------------------------------------------10871088_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::roughnessTextureFormat() const1089{1090    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( roughnessTextureFormat ) );1091}10921093//-------------------------------------------------------------------------------------------------------------------------------------------------------------10941095_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::specularHitDistanceTextureFormat() const1096{1097    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( specularHitDistanceTextureFormat ) );1098}10991100//-------------------------------------------------------------------------------------------------------------------------------------------------------------11011102_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::denoiseStrengthMaskTextureFormat() const1103{1104    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( denoiseStrengthMaskTextureFormat ) );1105}11061107//-------------------------------------------------------------------------------------------------------------------------------------------------------------11081109_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::transparencyOverlayTextureFormat() const1110{1111    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( transparencyOverlayTextureFormat ) );1112}11131114//-------------------------------------------------------------------------------------------------------------------------------------------------------------11151116_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::reactiveMaskTextureFormat() const1117{1118    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( reactiveMaskTextureFormat ) );1119}11201121//-------------------------------------------------------------------------------------------------------------------------------------------------------------11221123_MTLFX_INLINE MTL::PixelFormat MTLFX::TemporalDenoisedScalerBase::outputTextureFormat() const1124{1125    return NS::Object::sendMessage< MTL::PixelFormat >( this, _MTLFX_PRIVATE_SEL( outputTextureFormat ) );1126}11271128//-------------------------------------------------------------------------------------------------------------------------------------------------------------11291130_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::inputWidth() const1131{1132    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputWidth ) );1133}11341135//-------------------------------------------------------------------------------------------------------------------------------------------------------------11361137_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::inputHeight() const1138{1139    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( inputHeight ) );1140}11411142//-------------------------------------------------------------------------------------------------------------------------------------------------------------11431144_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::outputWidth() const1145{1146    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputWidth ) );1147}11481149//-------------------------------------------------------------------------------------------------------------------------------------------------------------11501151_MTLFX_INLINE NS::UInteger MTLFX::TemporalDenoisedScalerBase::outputHeight() const1152{1153    return NS::Object::sendMessage< NS::UInteger >( this, _MTLFX_PRIVATE_SEL( outputHeight ) );1154}11551156//-------------------------------------------------------------------------------------------------------------------------------------------------------------11571158_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::inputContentMinScale() const1159{1160    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMinScale ) );1161}11621163//-------------------------------------------------------------------------------------------------------------------------------------------------------------11641165_MTLFX_INLINE float MTLFX::TemporalDenoisedScalerBase::inputContentMaxScale() const1166{1167    return NS::Object::sendMessage< float >( this, _MTLFX_PRIVATE_SEL( inputContentMaxScale ) );1168}11691170//-------------------------------------------------------------------------------------------------------------------------------------------------------------11711172_MTLFX_INLINE simd::float4x4 MTLFX::TemporalDenoisedScalerBase::worldToViewMatrix() const1173{1174    return NS::Object::sendMessage< simd::float4x4 >( this, _MTLFX_PRIVATE_SEL( worldToViewMatrix ) );1175}11761177//-------------------------------------------------------------------------------------------------------------------------------------------------------------11781179_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setWorldToViewMatrix( simd::float4x4 worldToViewMatrix )1180{1181    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setWorldToViewMatrix_ ), worldToViewMatrix );1182}11831184//-------------------------------------------------------------------------------------------------------------------------------------------------------------11851186_MTLFX_INLINE simd::float4x4 MTLFX::TemporalDenoisedScalerBase::viewToClipMatrix() const1187{1188    return NS::Object::sendMessage< simd::float4x4 >( this, _MTLFX_PRIVATE_SEL( viewToClipMatrix ) );1189}11901191//-------------------------------------------------------------------------------------------------------------------------------------------------------------11921193_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setViewToClipMatrix( simd::float4x4 viewToClipMatrix )1194{1195    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setViewToClipMatrix_ ), viewToClipMatrix );1196}11971198//-------------------------------------------------------------------------------------------------------------------------------------------------------------11991200_MTLFX_INLINE MTL::Fence* MTLFX::TemporalDenoisedScalerBase::fence() const1201{1202    return NS::Object::sendMessage< MTL::Fence* >( this, _MTLFX_PRIVATE_SEL( fence ) );1203}12041205//-------------------------------------------------------------------------------------------------------------------------------------------------------------12061207_MTLFX_INLINE void MTLFX::TemporalDenoisedScalerBase::setFence( MTL::Fence* fence )1208{1209    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( setFence_ ), fence );1210}12111212//-------------------------------------------------------------------------------------------------------------------------------------------------------------12131214_MTLFX_INLINE void MTLFX::TemporalDenoisedScaler::encodeToCommandBuffer( MTL::CommandBuffer* commandBuffer )1215{1216    return NS::Object::sendMessage< void >( this, _MTLFX_PRIVATE_SEL( encodeToCommandBuffer_ ), commandBuffer );1217}1218