繁体   English   中英

金属色附件支持的像素格式

[英]Metal color attachment supported pixel formats

对于屏幕外缓冲区渲染(不在屏幕上绘制),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

您可以从Apple下载金属特征集表文档 目前是PDF。 它曾经是HTML。 无论如何,您会在其中找到一张表格,该表格显示每种操作系统的每个版本中哪些像素格式可用于什么目的。 R32UInt可用作所有操作系统的所有版本上的渲染目标。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM