Package apple.metalfx.protocol
Interface MTLFXTemporalScaler
-
public interface MTLFXTemporalScalerAPI-Since: 16.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable MTLTexturecolorTexture()These can change on a frame by frame basis.longcolorTextureFormat()Read-only immutable properties of effectlongcolorTextureUsage()Properties return the minimum required MTLTextureUsage bits required@Nullable MTLTexturedepthTexture()longdepthTextureFormat()longdepthTextureUsage()voidencodeToCommandBuffer(@NotNull MTLCommandBuffer commandBuffer)Method to encode the effect to a command buffer@Nullable MTLTextureexposureTexture()Exposure properties Ideally this is a 1x1 R16F texture.@Nullable MTLFencefence()Property for synchronization when using untracked resourceslonginputContentHeight()floatinputContentMaxScale()floatinputContentMinScale()longinputContentWidth()Dynamic Resolution propertylonginputHeight()longinputWidth()booleanisDepthReversed()Set whether the depth buffer uses reversed depth or not.floatjitterOffsetX()The jitter offset property indicates the pixel offset to sample in order to return to the frame's reference frame.floatjitterOffsetY()@Nullable MTLTexturemotionTexture()longmotionTextureFormat()longmotionTextureUsage()floatmotionVectorScaleX()Scale factor to be applied to motion vectors to convert to pixel/fragment coordinates in the input data.floatmotionVectorScaleY()longoutputHeight()@Nullable MTLTextureoutputTexture()outputTexture is required to have MTLStorageModePrivate for storageModelongoutputTextureFormat()longoutputTextureUsage()longoutputWidth()floatpreExposure()If the input color is pre-multiplied by fixed value, set this value which MetalFX will use to divide input color, this is not common.booleanreset()Reset.voidsetColorTexture(@Nullable MTLTexture value)These can change on a frame by frame basis.voidsetDepthReversed(boolean value)Set whether the depth buffer uses reversed depth or not.voidsetDepthTexture(@Nullable MTLTexture value)voidsetExposureTexture(@Nullable MTLTexture value)Exposure properties Ideally this is a 1x1 R16F texture.voidsetFence(@Nullable MTLFence value)Property for synchronization when using untracked resourcesvoidsetInputContentHeight(long value)voidsetInputContentWidth(long value)Dynamic Resolution propertyvoidsetJitterOffsetX(float value)The jitter offset property indicates the pixel offset to sample in order to return to the frame's reference frame.voidsetJitterOffsetY(float value)voidsetMotionTexture(@Nullable MTLTexture value)voidsetMotionVectorScaleX(float value)Scale factor to be applied to motion vectors to convert to pixel/fragment coordinates in the input data.voidsetMotionVectorScaleY(float value)voidsetOutputTexture(@Nullable MTLTexture value)outputTexture is required to have MTLStorageModePrivate for storageModevoidsetPreExposure(float value)If the input color is pre-multiplied by fixed value, set this value which MetalFX will use to divide input color, this is not common.voidsetReset(boolean value)Reset.
-
-
-
Method Detail
-
colorTexture
@Nullable @Nullable MTLTexture colorTexture()
These can change on a frame by frame basis. We don't care about the textures assigned except that they must match the originally specified dimensions and pixel formats.
-
colorTextureFormat
long colorTextureFormat()
Read-only immutable properties of effect
-
colorTextureUsage
long colorTextureUsage()
Properties return the minimum required MTLTextureUsage bits required
-
depthTexture
@Nullable @Nullable MTLTexture depthTexture()
-
depthTextureFormat
long depthTextureFormat()
-
depthTextureUsage
long depthTextureUsage()
-
encodeToCommandBuffer
void encodeToCommandBuffer(@NotNull @NotNull MTLCommandBuffer commandBuffer)Method to encode the effect to a command buffer
-
exposureTexture
@Nullable @Nullable MTLTexture exposureTexture()
Exposure properties Ideally this is a 1x1 R16F texture. Note that only R channel of the texel located at (0, 0) is used for exposure value. The value is used to multiply the input color, use GPU to generate the exposure value.
-
fence
@Nullable @Nullable MTLFence fence()
Property for synchronization when using untracked resources
-
inputContentHeight
long inputContentHeight()
-
inputContentMaxScale
float inputContentMaxScale()
-
inputContentMinScale
float inputContentMinScale()
-
inputContentWidth
long inputContentWidth()
Dynamic Resolution property
-
inputHeight
long inputHeight()
-
inputWidth
long inputWidth()
-
isDepthReversed
boolean isDepthReversed()
Set whether the depth buffer uses reversed depth or not. Defaults to YES.
-
jitterOffsetX
float jitterOffsetX()
The jitter offset property indicates the pixel offset to sample in order to return to the frame's reference frame.
-
jitterOffsetY
float jitterOffsetY()
-
motionTexture
@Nullable @Nullable MTLTexture motionTexture()
-
motionTextureFormat
long motionTextureFormat()
-
motionTextureUsage
long motionTextureUsage()
-
motionVectorScaleX
float motionVectorScaleX()
Scale factor to be applied to motion vectors to convert to pixel/fragment coordinates in the input data. The expectation for a 1.0 scale factor is that each pixel's motion vector will point to where that pixel was in the prior frame. Assuming standard Metal device coordinates (0,0 is upper left in the framebuffer), the motion vectors for an object that moved down and to the right in the framebuffer texture by 10 pixels would be -10,-10.
-
motionVectorScaleY
float motionVectorScaleY()
-
outputHeight
long outputHeight()
-
outputTexture
@Nullable @Nullable MTLTexture outputTexture()
outputTexture is required to have MTLStorageModePrivate for storageMode
-
outputTextureFormat
long outputTextureFormat()
-
outputTextureUsage
long outputTextureUsage()
-
outputWidth
long outputWidth()
-
preExposure
float preExposure()
If the input color is pre-multiplied by fixed value, set this value which MetalFX will use to divide input color, this is not common.
-
reset
boolean reset()
Reset. Set to true when history is invalid (scene cut, etc.)
-
setColorTexture
void setColorTexture(@Nullable @Nullable MTLTexture value)These can change on a frame by frame basis. We don't care about the textures assigned except that they must match the originally specified dimensions and pixel formats.
-
setDepthReversed
void setDepthReversed(boolean value)
Set whether the depth buffer uses reversed depth or not. Defaults to YES.
-
setDepthTexture
void setDepthTexture(@Nullable @Nullable MTLTexture value)
-
setExposureTexture
void setExposureTexture(@Nullable @Nullable MTLTexture value)Exposure properties Ideally this is a 1x1 R16F texture. Note that only R channel of the texel located at (0, 0) is used for exposure value. The value is used to multiply the input color, use GPU to generate the exposure value.
-
setFence
void setFence(@Nullable @Nullable MTLFence value)Property for synchronization when using untracked resources
-
setInputContentHeight
void setInputContentHeight(long value)
-
setInputContentWidth
void setInputContentWidth(long value)
Dynamic Resolution property
-
setJitterOffsetX
void setJitterOffsetX(float value)
The jitter offset property indicates the pixel offset to sample in order to return to the frame's reference frame.
-
setJitterOffsetY
void setJitterOffsetY(float value)
-
setMotionTexture
void setMotionTexture(@Nullable @Nullable MTLTexture value)
-
setMotionVectorScaleX
void setMotionVectorScaleX(float value)
Scale factor to be applied to motion vectors to convert to pixel/fragment coordinates in the input data. The expectation for a 1.0 scale factor is that each pixel's motion vector will point to where that pixel was in the prior frame. Assuming standard Metal device coordinates (0,0 is upper left in the framebuffer), the motion vectors for an object that moved down and to the right in the framebuffer texture by 10 pixels would be -10,-10.
-
setMotionVectorScaleY
void setMotionVectorScaleY(float value)
-
setOutputTexture
void setOutputTexture(@Nullable @Nullable MTLTexture value)outputTexture is required to have MTLStorageModePrivate for storageMode
-
setPreExposure
void setPreExposure(float value)
If the input color is pre-multiplied by fixed value, set this value which MetalFX will use to divide input color, this is not common.
-
setReset
void setReset(boolean value)
Reset. Set to true when history is invalid (scene cut, etc.)
-
-