title: Ugly rendering of GLTF with vertex colors
body: <p><strong>The geometry</strong></p>
  <p>I have a cube represented as a triangular mesh:</p>
  <p><a href="https://i.stack.imgur.com/DquR6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DquR6.png" alt="enter image description here" /></a></p>
  <p><strong>Applying a color</strong></p>
  <p>Each of the vertices gets a color assigned, to apply a color map onto the cube.</p>
  <p>In GLTF format, the mesh is therefore described as follows:</p>
  <pre><code>{
          &quot;primitives&quot;: [
              {
                  &quot;attributes&quot;: {
                      &quot;POSITION&quot;: 0,
                      &quot;COLOR_0&quot;: 2
                  },
                  &quot;indices&quot;: 1
              }
          ]
      }
  </code></pre>
  <p><strong>Problem: Ugly rendering</strong></p>
  <p>Unfortunately, this is rendered with ugly artifacts. The color of the three vertices of a face are not smoothly interpolated across the face, but there are brighter and darker zones along the edges of the triangles. This happens with various renderers such as Babylon.js, Cesium, Filament, Three.js.</p>
  <p>What's the reason for those artifacts and how can I get a smooth colormap on my cube?</p>
  <p><a href="https://i.stack.imgur.com/XQjUf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XQjUf.png" alt="enter image description here" /></a></p>