南锋

南奔万里空,脱死锋镝余

Sampler binding cc_spriteTexture at set 2 binding 11 is not bounded

开发环境:
cocosCreator 版本: 3.7.2
xCode 版本: 16.2
报错:Sampler binding cc_spriteTexture at set 2 binding 11 is not bounded.
表现: shader表现有问题

具体表现为乱码或者是没有想要的效果。Xcode运行时会不断的报同一条日志。
具体报错日志:

1
2
3
/Applications/Cocos/Creator/3.7.2/CocosCreator.app/Contents/Resources/resources/3d/engine/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm: line 906 
10:22:13 [ERROR]: Sampler binding cc_spriteTexture at set 2 binding 11 is not bounded.
10:22:13 [ERROR]: [ERROR] file

解决方案

修改effect文件,将binding =的值改为binding = 12,我这里之前是binding = 11
如下图:
image.png
image.png

参考方案

官方链接 https://forum.cocos.org/t/topic/158564

+