CesiumGS / CesiumGS/cesium-native
upsampleGltfForRasterOverlays produces unnormalized normals
- Dominant language
- C++
- Stars
- 623
- Forks
- 277
- PR merge metrics
- No merged PRs in 30d
Description
glTFs created by the `upsampleGltfForRasterOverlays` often fail [validation](https://github.khronos.org/glTF-Validator/) with messages like this:
```
{
"code": "ACCESSOR_VECTOR3_NON_UNIT",
"message": "Vector3 at accessor indices 810..812 is not of unit length: 0.9929924240874767.",
"severity": 0,
"pointer": "/meshes/0/primitives/0/attributes/NORMAL"
}
```
This is almost certainly caused by the linear interpolation of vertex attributes in order to trim triangles that cross the tile edge. We should re-normalize the normals after interpolating. This is slightly tricky only because we don't currently know which attributes are normals, and hence should be renormalized. Note that TANGENT also has [normalization requirements](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview).
Contributor guide
Assessment
This issue has not been assessed yet.