CesiumGS/cesium
Voir sur GitHubIrrelevant error message from `PerInstanceColorAppearance`
Open
#12 107 ouverte le 2 août 2024
FCFcategory - docgood first issuetype - bug
Métriques du dépôt
- Stars
- (11 758 stars)
- Métriques de merge PR
- (Merge moyen 26j 3h) (26 PRs mergées en 30 j)
Description
What happened?
As reported on the forum
Adding a GeometryInstance with a RectangleOutlineGeometry to the scene as a Primitive with a default PerInstanceColorAppearance gives the following error:
DeveloperError: Appearance/Geometry mismatch. The appearance requires vertex shader attribute input 'compressedAttributes', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.
See this Sandcastle example.
But vertexFormat is not an option for RectangleOutlineGeometry. In this case, the PerInstanceColorAppearance will work as long as it is initialized with the option flat: true. See this updated Sandcastle.
Reproduction steps
- Construct a
GeometryInstancewith aRectangleOutlineGeometry - Add it to the scene with a default
PerInstanceColorAppearance
Sandcastle example
Environment
Browser: Chrome CesiumJS Version: 1.120 Operating System: Windows