Search code examples
iosmetal

MTLRenderCommandEncoder for compute processing?


Trying to put together a puzzle:

Use case:

  • Apply simultaneously 2x zoom effect & shake effect (with 10% of width offset) to the stored video file.

Solution

  • You can process buffers (including vertex buffers) in compute shaders. There are tons of techniques that are using it: particle systems, custom tessellation from Unity in SIGGRAPH'22, cloth simulation and many others.

    In addition to compute shaders in OpenGL there is transform feedback that allows you to use part of rendering pipeline (before rasterization). However, Metal does not provide API for it.