sokol icon indicating copy to clipboard operation
sokol copied to clipboard

[Feature request]: sRGB support in sokol_gfx.h

Open floooh opened this issue 4 years ago • 3 comments

sokol_gfx.h should expose the hardware sRGB features to perform sRGB-to-linear conversion when sampling textures and back to sRGB in framebuffers (two separate things)

See: https://twitter.com/tumult/status/1439897518297411591

...probably needs to be behind feature-flags because of WebGL/GLES2.

floooh avatar Sep 20 '21 11:09 floooh

Are you planning to maintain WebGL/GLES2 support? With the latest Safari, WebGL2 seems widely available now.

OkanArikan avatar Mar 04 '22 23:03 OkanArikan

@OkanArikan I think we can drop WebGL1/GLES2 now, but I haven't yet made plans when exactly this will happen (some time this year with the WebGPU backend would probably be a good time).

floooh avatar Jan 26 '23 19:01 floooh

PS: some more digging regarding SRGB framebuffers:

https://github.com/floooh/sokol/pull/758#issuecomment-1405377648

floooh avatar Jan 26 '23 19:01 floooh