cesium: Fix model shader generation when normals are missing
processPbrMetallicRoughness
always expects normals to exist, but that is not always the case. We should have a separate shader path for those models that would look similar to the constant lighting in processModelMaterialsCommon
.
This will fix https://github.com/AnalyticalGraphicsInc/cesium/issues/5835.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (11 by maintainers)
BabylonJS has an option to createNormals based on the mesh:
https://doc.babylonjs.com/api/classes/babylon.abstractmesh#createnormals
Might be worth looking at it and get inspiration from here:
https://github.com/BabylonJS/Babylon.js/blob/c54863cf32d8045db2fc0b56949974563db75fd7/src/Mesh/babylon.abstractMesh.ts#L1801