-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Color PartialEq is broken when comparing different variants #9750
Copy link
Copy link
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
0.11.2
Bug
Color PartialEq is implemented via derive. This means that different variants won't be equivalent, even if logically they should be.
Color::BLACK is Rgba(0, 0, 0, 1). RgbaLinear(0, 0, 0, 1) should be equivalent, but it is currently not.
We should write a by-hand PartialEq impl that converts all color variants to Rgba (or whatever we expect to incur the least conversion overhead), and then checks equivalence.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior