# Meshes going black after calling geometry.computeVertexNormals()

**URL:** <https://discourse.threejs.org/t/meshes-going-black-after-calling-geometry-computevertexnormals/45468>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [December 5, 2022, 10:38am UTC](https://discourse.threejs.org/t/meshes-going-black-after-calling-geometry-computevertexnormals/45468 "2022-12-05T10:38:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![binoy\_t](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/binoy_t/32/24330_2.png) [@binoy\_t](https://discourse.threejs.org/u/binoy_t)\
**Post date:** [December 5, 2022, 10:38am UTC](https://discourse.threejs.org/t/meshes-going-black-after-calling-geometry-computevertexnormals/45468/1 "2022-12-05T10:38:17Z")

</div>

Hi, I was trying to add shadows, and when I tried the following solution some of the meshes in the model changed to black color. I didn’t understand what’s wrong.

> [@GLTF model shadows not receiving with GLTFMeshStandardSGMaterial](https://discourse.threejs.org/t/gltf-model-shadows-not-receiving-with-gltfmeshstandardsgmaterial/24112/8):
>
> I’m not sure what to make of that. It may be worth filing an issue on the three.js repository since something is not working consistently across devices here.

My code:

```javascript
let loader = new THREE.GLTFLoader();
      loader.parse(text, undefined,
        function (gltf) {
          model = gltf.scene;
          model.scale.set(1, 1, 1);
          scene.add(model);
          model.traverse((mesh) => {
            if (!mesh.isMesh) return;
            mesh.material.roughness = 0;
            mesh.material.metalness = .5;
            mesh.castShadow = true
            mesh.recieveShadow = true
            mesh.geometry.computeVertexNormals()
          });
        },
        undefined,
        function (error) {
          buttonBussy(false);
          console.error(error);
        }
      );

```

Thanks,  
Binoy
