CesiumGS / cesium-unreal

Bringing the 3D geospatial ecosystem to Unreal Engine
https://cesium.com/platform/cesium-for-unreal/
Apache License 2.0
902 stars 287 forks source link

Fix crash when enabling Ignore `KHR_materials_unlit` on point clouds #1340

Closed azrogers closed 7 months ago

azrogers commented 7 months ago

Fixes #1268.

Enabling the setting to Ignore KHR_materials_unlit forces the glTF implementation to compute flat normals for the primitive, as per the glTF spec. However, we can't compute flat normals for points or line primitives, causing a crash if this setting was enabled on a point cloud. This change adds a check that ignores this setting if specified on a non-triangle primitive.

azrogers commented 7 months ago

@j9liu Made the enum check explicit and updated CHANGES.md!

j9liu commented 7 months ago

Thanks @azrogers !