MTLFX
The MTLFX plugin integrates Apple MetalFX library to provide temporal antialiasing and upscaling on macOS and iOS, enabling high-quality visuals with improved rendering performance.
info
The MTLFX plugin is built into the Render System and is fully integrated with both Tellusim Explorer and Tellusim Executor.
#include <render/mtlfx/include/TellusimRenderMTLFX.h>
Example
// Create MTLFX
RenderMTLFX render_mtlfx;
if(!render_mtlfx.create(device)) return false;
// light texture
renderer.dispatchLight(device, compute, frame, renderer_flags);
// Generate occluder texture
renderer.dispatchOccluder(device, compute, frame, renderer_flags);
// Calculate luminance for exposure adaptation
renderer.dispatchLuminance(device, compute, frame, renderer_flags);
// Run MTLFX upscaling
render_mtlfx.dispatch(device, compute, frame);
// Final tonemapping and compositing
renderer.dispatchComposite(device, compute, frame, RenderRenderer::FlagCompositeTonemap);