如何使用带有金属的 SCNTechnique 模板

问题描述

我一直在尝试将 Stencils 与 SCNTechnique 一起使用。

即使我将其简化为最简单的设置,如下所示:

    "sequence": ["stencilFillPass"]
    "passes": {
        "stencilFillPass": {
             "outputs": {
                "color": "COLOR","depth": "DEPTH"
             },"stencilStates": {
                "enable": true,"behavior": {
                    "writeMask": true,"depthFail": "zero","pass": "replace","readMask": 0,"referenceValue": 255
                    "fail": "zero"
                    "function": "always"
                },"clear": true
            },"draw": "DRAW_SCENE","includeCategoryMask": 1

我总是收到这个错误:

validateAttachmentOnDevice:457: failed assertion `PixelFormat MTLPixelFormatStencil8 is not depth renderable'

我在网上找不到任何人能够将 Stencils 与 SceneKit+Metal 结合使用:

似乎它在 OpenGL 时代确实有效。

因此,向任何能够让 Stencils 与 SceneKit 和 Metal 一起工作的人发出呼吁。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...