public class MPSTemporalAA extends MPSKernel implements NSSecureCoding, NSCopying
The color for the previous frame will be sampled using the provided motion vector texture and blended with the current frame according to the blendFactor property. The colors from the previous frame will be clamped to the color-space bounding box formed by the center pixel's neighbors to avoid reprojection artifacts, and the motion vector texture will be dilated to avoid aliased silhouette edges under motion.
For the best result, the sample positions produced by the renderer should be jittered every frame, ideally using a low discrepency sequence. This will ensure that different sample positions along edges will be visited over time even if the camera is not moving. This will also reduce aliasing due to textures and high-frequency shading.
For reference, see "High-Quality Temporal Supersampling" by Karis.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
MPSTemporalAA(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
static MPSTemporalAA |
alloc() |
static MPSTemporalAA |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
float |
blendFactor()
How much to blend the current frame with the previous frame during temporal antialiasing.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
MPSTemporalAA |
copyWithZoneDevice(org.moe.natj.general.ptr.VoidPtr zone,
MTLDevice device)
Make a copy of this MPSKernel for a new device
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeToCommandBufferSourceTexturePreviousTextureDestinationTextureMotionVectorTextureDepthTexture(MTLCommandBuffer commandBuffer,
MTLTexture sourceTexture,
MTLTexture previousTexture,
MTLTexture destinationTexture,
MTLTexture motionVectorTexture,
MTLTexture depthTexture)
Encode temporal antialiasing a command buffer
|
void |
encodeWithCoder(NSCoder coder) |
static long |
hash_static() |
MPSTemporalAA |
init() |
MPSTemporalAA |
initWithCoder(NSCoder coder)
NS_DESIGNATED_INITIALIZER
|
MPSTemporalAA |
initWithCoderDevice(NSCoder aDecoder,
java.lang.Object device)
NSSecureCoding compatability
|
MPSTemporalAA |
initWithDevice(java.lang.Object device)
Standard init with default properties per filter type
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static MPSTemporalAA |
new_objc() |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setBlendFactor(float value)
How much to blend the current frame with the previous frame during temporal antialiasing.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
static long |
version_static() |
device, label, options, setLabel, setOptionsaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static MPSTemporalAA alloc()
public static MPSTemporalAA allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public float blendFactor()
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingcopyWithZone in class MPSKernelpublic MPSTemporalAA copyWithZoneDevice(org.moe.natj.general.ptr.VoidPtr zone, MTLDevice device)
MPSKernel-copyWithZone: will call this API to make a copy of the MPSKernel on the same device. This interface may also be called directly to make a copy of the MPSKernel on a new device. Typically, the same MPSKernels should not be used to encode kernels on multiple command buffers from multiple threads. Many MPSKernels have mutable properties that might be changed by the other thread while this one is trying to encode. If you need to use a MPSKernel from multiple threads make a copy of it for each additional thread using -copyWithZone: or -copyWithZone:device:
copyWithZoneDevice in class MPSKernelzone - The NSZone in which to allocate the objectdevice - The device for the new MPSKernel. If nil, then use
self.device.public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public void encodeToCommandBufferSourceTexturePreviousTextureDestinationTextureMotionVectorTextureDepthTexture(MTLCommandBuffer commandBuffer, MTLTexture sourceTexture, MTLTexture previousTexture, MTLTexture destinationTexture, MTLTexture motionVectorTexture, MTLTexture depthTexture)
The motion vector texture must be at least a two channel texture representing how many texels each texel in the source image(s) have moved since the previous frame. The remaining channels will be ignored if present. This texture may be nil, in which case the motion vector is assumed to be zero, which is suitable for static images.
The depth texture must contain the depth values for directly visible geometry for the current frame for each pixel. The first channel must store the depth value from zero to infinity. The depth texture may be nil, but this will prevent motion vectors from being dilated and may introduce aliasing along silhouette edges.
The destination texture should be used as the previous texture in the next frame.
commandBuffer - Command buffer to encode intosourceTexture - Current frame to denoisepreviousTexture - Previous denoised frame to reproject into current
framedestinationTexture - Output blended imagemotionVectorTexture - Motion vector texturedepthTexture - The depth values for the current framepublic void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingencodeWithCoder in class MPSKernelpublic static long hash_static()
public MPSTemporalAA init()
public MPSTemporalAA initWithCoder(NSCoder coder)
NSCodinginitWithCoder in interface NSCodinginitWithCoder in class MPSKernelpublic MPSTemporalAA initWithCoderDevice(NSCoder aDecoder, java.lang.Object device)
MPSKernelWhile the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead.
initWithCoderDevice in class MPSKernelaDecoder - The NSCoder subclass with your serialized MPSKerneldevice - The MTLDevice on which to make the MPSKernelpublic MPSTemporalAA initWithDevice(java.lang.Object device)
MPSKernelinitWithDevice in class MPSKerneldevice - The device that the filter will be used on. May not be NULL.public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static MPSTemporalAA new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public void setBlendFactor(float value)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static boolean supportsSecureCoding()
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCoding_supportsSecureCoding in class MPSKernelpublic static long version_static()