3D物体遮挡透视

Creator 版本: 3.4.1
使用论坛大佬写的x-ray effect 文件报错,应该是3.0.0升级到3.4.1的缘故
论坛地址:3d模型擦拭效果
报错如下
[Window] The “path” argument must be of type string or an instance of Buffer or URL. Received undefined


想要的效果
搜狗截图20220303164305
只能边学习边提问,看能不能快速解决 :joy:
xray.rar (2.4 MB)

嗯,3.0.0 -> 3.4.1 中间自定义材质的一些接口有变动
xray341.zip (2.4 MB)

项目参考
https://gitee.com/yeshao2069/cocos-creator-shader/tree/v3.4.x/demo/Creator3.4.1_3D_XRay-basedModelOcclusionPerspective

自定义材质升级指南
https://docs.cocos.com/creator/3.1/manual/zh/material-system/Material-upgrade-documentation-for-v3.0-to-v3.1.html