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

Add support to BC4 and BC5 format #2013

Merged
merged 1 commit into from Jun 24, 2018
Merged

Add support to BC4 and BC5 format #2013

merged 1 commit into from Jun 24, 2018

Conversation

Qining
Copy link
Contributor

@Qining Qining commented Jun 22, 2018

So that BC4 and BC5 format images can be converted to RGBA8_UNORM format.

@@ -160,36 +160,35 @@ func decodeAlphaDXT3(r binary.Reader, dst []pixel) {

func decodeAlphaDXT5(r binary.Reader, dst []pixel) {
a0, a1, codes := int(r.Uint8()), int(r.Uint8()), uint64(r.Uint16())|(uint64(r.Uint32())<<16)
for i := 0; i < 16; i++ {
dst[i].a = mixAlphaDXT5(a0, a1, codes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignorable: I unfortunately suspect this might not inline, but I do side with readability / reuse than raw performance in this case.

@Qining Qining merged commit e270884 into google:master Jun 24, 2018
@Qining Qining deleted the bc4-format branch October 23, 2018 17:32
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.

None yet

2 participants