Metal Computing Core vs. Fragment Shader

Metal supports kernelin addition to the standard functions vertexand fragment. I found a metal example kernelthat converts an image to shades of gray.

What is the difference between this in kernelvs fragment? What can calculate kernel(better) what a shader fragmentcannot and vice versa?

+4
source share
1 answer

Metal has four different types of command encoders:

  • MTLRenderCommandEncoder
  • MTLComputeCommandEncoder
  • MTLBlitCommandEncoder
  • MTLParallelRenderCommandEncoder

, MTLRenderCommandEncoder. . .

MTLComputeCommandEncoder. , , , , , , , , , .

compute :

https://developer.apple.com/reference/metal/mtlcomputecommandencoder

, , , .

+4

Source: https://habr.com/ru/post/1663073/


All Articles