CesiumGS/cesium
View on GitHubIrrelevant error message from `PerInstanceColorAppearance`
Open
#12,107 opened on Aug 2, 2024
category - docgood first issuetype - bug
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