floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.63k stars 472 forks source link

Something wrong with WebGPU #920

Closed ryuukk closed 9 months ago

ryuukk commented 9 months ago

https://floooh.github.io/sokol-html5/spine-inspector-sapp.html

image

https://floooh.github.io/sokol-webgpu/spine-inspector-sapp.html

image

WebGPU is darker

floooh commented 9 months ago

What device, platform and browser is this?

floooh commented 9 months ago

Wait! I can reproduce on Chrome macOS, why didn't I notice this before?

floooh commented 9 months ago

Might be some sort of SRGBA problem, the texcube sample which uses fully saturated colors looks identical.

I'll investigate. It must be a somewhat recent regression, otherwise I would have noticed it during development.

floooh commented 9 months ago

Ah silly me:

https://github.com/floooh/sokol/blob/08ae58e275decf36ca932ac8be3469556a46992f/sokol_gfx.h#L12787-L12788

I remember that I added the SRGB format sort of last minute before merging. I should be more careful. Fix incoming

floooh commented 9 months ago

Ok fixed, webpage will be updated when this CI job finishes: https://github.com/floooh/sokol-samples/actions/runs/6611073889

Thanks for the bug report!