wgpu
wgpu copied to clipboard
Colors on ANGLE are darker than expected
Description Colors on ANGLE are darker than expected, likely because of some sRGB color issue.
Repro steps https://gist.github.com/bigfarts/3f051479c2c786d91f0b4e618d346dbc
This is just a basic drawing demo, which emits fragment color vec4<f32>(0.5, 0.2, 0.3, 1.0)
.
Expected vs observed behavior
Vulkan:
Metal:
ANGLE:
Extra materials The swapchain format selected on all of Vulkan, Metal, and ANGLE are Bgra8UnormSrgb, but it looks like ANGLE treats the input color as sRGB but Vulkan and Metal treat it as linear.
Platform OS: Windows 11 wgpu version: v0.13.2 ANGLE version: https://github.com/google/gfbuild-angle/releases/tag/github%2Fgoogle%2Fgfbuild-angle%2Ff810e998993290f049bbdad4fae975e4867100ad
Replacing the EGL code with the WebGL code gets the colors right, but I don't know if it's a good fix: https://gist.github.com/bigfarts/b1f3759e61afb62b41c0a88e2e1602d2
I think this should not be an issue anymore.