Skip to content

Wrong background color with the same ClearColor on some machines #5809

Closed
@benfrankel

Description

@benfrankel

Bevy version

0.8.1

Relevant system information

AdapterInfo { name: "Intel(R) UHD Graphics 610 (WHL GT1)", vendor: 32902, device: 16033, device_type: IntegratedGpu, backend: Vulkan }

What you did

App::new()
    .insert_resource(ClearColor(Color::rgb(0.5, 0.5, 0.5)))
    .add_plugins(DefaultPlugins)
    .run();

What went wrong

  • Expected #7f7f7f as the background color.
  • Saw #373737 as the background color.

Additional information

Notably, 0x37 == 55 == (0.5.powf(2.2) * 255).round(), so this issue might have something to do with gamma conversion.

On my other machine I see the correct background color #7f7f7f. Other machine's GPU:

AdapterInfo { name: "AMD RADV POLARIS10", vendor: 4098, device: 26591, device_type: DiscreteGpu, backend: Vulkan }

EDIT: Also notable that sprite colors manifest correctly on both machines. It's just the background color that's wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-WindowingPlatform-agnostic interface layer to run your app inC-BugAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions