I'm trying to create a MTLFXTemporalScaler as follows (this is adapted from the sample code):
func updateTemporalScaler() {
let desc = MTLFXTemporalScalerDescriptor()
desc.inputWidth = renderTarget.renderSize.width
desc.inputHeight = renderTarget.renderSize.height
desc.outputWidth = renderTarget.windowSize.width
desc.outputHeight = renderTarget.windowSize.height
desc.colorTextureFormat = .bgra8Unorm
desc.depthTextureFormat = .depth32Float
desc.motionTextureFormat = .rg16Float
desc.outputTextureFormat = .bgra8Unorm
guard let temporalScaler = desc.makeTemporalScaler(device: device) else {
fatalError("The temporal scaler effect is not usable!")
}
temporalScaler.motionVectorScaleX = Float(renderTarget.renderSize.width)
temporalScaler.motionVectorScaleY = Float(renderTarget.renderSize.height)
mfxTemporalScaler = temporalScaler
}
I'm getting the following error the 3rd time the code is called:
/AppleInternal/Library/BuildRoots/91a344b1-f985-11ee-b563-fe8bc7981bff/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/RegionOps/ANRegion.mm:855: failed assertion `ANE intermediate buffer handle not same!'
When I copy the code out to a playground, it succeeds when called with the same sequence of descriptors. Does this seem like a bug with MTLFXTemporalScaler?
MetalFX
RSS for tagMetalFX provides platform-optimized graphics effects for apps built with Metal. Render complex scenes in less time per frame with high-performance upscaling and anti-aliasing using MetalFX Upscaling.
Posts under MetalFX tag
3 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
After the build 4.2.9. I have a weird bug. It keep crashing and when I read the message, it display
validateRenderPassDescriptor:782: failed assertion `RenderPass Descriptor Validation
Texture at colorAttachment[0] has usage (0x01) which doesn't specify MTLTextureUsageRenderTarget (0x04)
This happen when I run in debug mode and try to hook up the motion template. I found out that the output texture create have usage only "MTLTextureUsageShaderRead" but no "MTLTextureUsageRenderTarget"
Anyone have problem like me?
I uusing fxplug 4.2.9
motion 5.7 and final cut 10.7.1. running in sonoma 14.2.1
Hi,
trying to wrap my head around Xcode's FXPlug. I already sell Final Cut Pro titles for a company. These titles were built in motion.
However, they want me to move them to an app and I'm looking for any help on how to accomplish this
*What the app should do is:
Allow users with an active subscription to our website the ability to access titles within FCPX and if they are not an active subscriber, for access to be denied.