Skip to content
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

Additional texture pixel formats [BC3, BC7, ETC2 with sRGB, ASTC 4x4] #967

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

allcreater
Copy link
Contributor

This request is adding support for some broadly used compressed texture formats, which could be very useful with the basis_universal texture transcoding library.

Extended set of "known" formats with SRGB support:

  • BC3_SRGBA
  • BC7_SRGBA
  • ETC2_SRGB8
  • ETC2_SRGB8A8

"Brand-new" ASTC format:

  • ASTC_4x4_RGBA,
  • ASTC_4x4_SRGBA

4x4 subset is selected as the most broadly used and the only one of ASTC formats that is supported by the transcoding library.

@floooh
Copy link
Owner

floooh commented Jan 16, 2024

Github Actions being wonky again :/ I just restarted the failed iOS job and it worked (previously it was failing to pull in a git submodule).

Ah, I was wondering exactly why only select the 4x4 block size for ASTC... thanks for pointing that out :)

I'll need to wrap up some work on the sokol-zig bindings (hopefully tomorrow evening) then I can look into your PR.

@floooh
Copy link
Owner

floooh commented Jan 18, 2024

Giving it a quick test now...

@floooh floooh merged commit c40bb56 into floooh:master Jan 18, 2024
23 checks passed
@floooh
Copy link
Owner

floooh commented Jan 18, 2024

And merged. Thanks!

Only thing I changed was moving the SRGB pixel formats closer to their non-SRGB equivalents in the sg_pixel_format enum, and a small if-else coding style change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants