wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Colors on ANGLE are darker than expected

Open bigfarts opened this issue 2 years ago • 1 comments

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: image

Metal: image

ANGLE: image

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

bigfarts avatar Sep 08 '22 17:09 bigfarts

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

bigfarts avatar Sep 08 '22 19:09 bigfarts

I think this should not be an issue anymore.

cwfitzgerald avatar Oct 14 '23 03:10 cwfitzgerald