Damus
slembcke · 10w
Graphics Mastodon: Is it possible to have an sRGB default framebuffer in WebGL2? (Replacement for glEnable(GL_FRAMEBUFFER_SRGB)) I'm seeing a references that you can have sRGB framebuffer objects in ...
slembcke profile picture
So WebGL calls the "default framebuffer" the drawing buffer.

https://registry.khronos.org/webgl/specs/latest/1.0/#THE_DRAWING_BUFFER

The answer is to call context.drawingBufferStorage() with an sRGB format. BUT... the reason this was so hard to find maybe is that FireFox and Safari don't bother to implement this part of the spec despite it being in WebGL1.0. :(

So it seems the answer really is to insert a worthless shader pass that implements this by hand. Blegh.

Is having sRGB framebuffers not considered fundamental in 20XX?!
1
Andre Weissflog · 10w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqz9myc59yadhemq6s3mpsugrdzzfqr55c582tedltugukfwhgtn5se7valu IME sRGB always has been a clusterfuck of buggy implementations and missing features, especially in GL drivers. I bet most games do the sRGB conversion before writing to the render targe...