-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for compressed sRGB formats #6743
Conversation
By the way, is there a decode function for 4 component vectors? I remember we needed a texture with alpha channel, but seems $DECODE variants are only for vec3. Not a big deal, as we just manually do the same, just curious. |
We don't have one as transparency is in linear space. But I guess if you store other data in the alpha channel (say a greyscale color), you might need to use a custom decode function. |
Right, custom data. Alright, thanks. |
Co-authored-by: Will Eastcott <will@playcanvas.com>
…gine into mv-compressed-srgb
[PIXELFORMAT_RGBA4, { name: 'RGBA4', size: 2, srgb: true }], | ||
[PIXELFORMAT_RGB8, { name: 'RGB8', size: 4, srgb: true }], | ||
[PIXELFORMAT_RGBA8, { name: 'RGBA8', size: 4, srgb: true }], | ||
[PIXELFORMAT_A8, { name: 'A8', size: 1, ldr: true }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think it would be neater to flag the few hdr formats as hdr
rather than the relatively many formats as ldr
. (Integer formats aren't color formats and so shouldn't get either flag).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with some comments
{ srgb = true; }
option, similarly to non-compressed formatspartially implements #3715