CesiumGS/cesium
Irrelevant error message from `PerInstanceColorAppearance`
Aberta
#12.107 aberto em 2 de ago. de 2024
FCFcategory - docgood first issuetype - bug
Métricas do repositório
- Stars
- (11.758 estrelas)
- Métricas de merge de PR
- (Mesclagem média 15d 12h) (23 fundiu PRs em 30d)
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