如何修复在 a 帧中 gltf 模型上显示的灰色方块?

How to fix grey squares showing on gltf model in a-frame?

在 aframe 中查看模型时,我在 gltf 模型上看到奇怪的方块。

我尝试制作一个 AR HTML 来扫描标记并在其上显示模型。当我在线检查 gltf 查看器中的模型时,它很好,但通过 webapp 查看时,它上面有灰色方块。有人以前看过这个吗?

<a-scene embedded
    vr-mode-ui="enabled: false"
    shadow="type: pcf"
    arjs='sourceType: webcam; sourceWidth:1280; sourceHeight:960; 
displayWidth: 1280; displayHeight: 960; debugUIEnabled: false;'>

               <!-- add your models -->
        <a-asset-item id="animated-asset" 
         src="https://artshirtsonline.com/shanatova/models/test2.gltf"  > 
                   </a-asset-item>
                           </a-assets>
    <a-entity animation-mixer="loop: repeat" gltf-model='#animated-asset' 
            scale="1 1 1"
            shadow="cast: true"
            rotation="-90 0 0"></a-entity>

查找shadowMap.bias 您可以调整它以调整阴影痤疮。还要确保你的影子相机远近与你的场景覆盖相匹配。