【问题标题】:Metal color attachment supported pixel formats金属色附件支持的像素格式
【发布时间】:2018-08-04 06:13:48
【问题描述】:

对于屏幕外缓冲区渲染(不在屏幕上绘制),iOS 上的 Metal 是否支持 MTLPixelFormatR32Uint 作为像素格式?换句话说,这样的事情应该起作用吗?

 let pipelineStateDescriptor = MTLRenderPipelineDescriptor()
 pipelineStateDescriptor.vertexDescriptor = vertexDescriptor
 pipelineStateDescriptor.vertexFunction = vertexProgram
 pipelineStateDescriptor.fragmentFunction = fragmentProgram
 pipelineStateDescriptor.colorAttachments[0].pixelFormat = .R32Uint;
pipelineStateDescriptor.colorAttachments[0].blendingEnabled = true

【问题讨论】:

    标签: ios metal metalkit metal-performance-shaders


    【解决方案1】:

    您可以从 Apple 下载Metal Feature Set Tables document。目前是PDF。它曾经是 HTML。无论如何,您会在那里找到一个表格,显示在每个操作系统的每个版本中哪些像素格式可用于什么目的。 R32UInt 可用作所有操作系统的所有版本的渲染目标。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多