-
Notifications
You must be signed in to change notification settings - Fork 59
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
Basis plugins: support UASTC HDR #145
Conversation
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.
First of all, thanks a lot!
Doing a really tired review, so apologies if something doesn't make sense or the ramblings are too long. ... or if I'm pointing out something you mentioned in the description, such as tests. Or tests.
for(std::size_t x = 0; x != src.size()[1]; ++x) | ||
dst[y][x] = Math::Vector3<T>::pad(src[y][x]); /* Alpha implicitly opaque */ | ||
|
||
} else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ |
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.
Ah, this reminds me you requested the batch swizzle. On my list :)
Oops, I committed the basisu binary 🙈 Have to undo that |
R32F is now a valid format and leads to an unexpected successful image conversion
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #145 +/- ##
=======================================
Coverage 96.99% 97.00%
=======================================
Files 147 147
Lines 16552 16600 +48
=======================================
+ Hits 16054 16102 +48
Misses 498 498
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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'll try to do a more thorough review later today, but so far seems like I won't have much to complain about. 👌
Instead of an unavoidable copy. If users want 4-byte alignment, they can choose to perform the copy themselves. Most other importers do the same thing.
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.
One last bit, other than that looks good to me (plus the 1-byte alignment from above, and arrayCast()
instead of mutablePixels()
).
I'm still rushing deadlines, so I won't be able to add that fake ldr/hdr extension for WebGL until later next week. So either the PR will wait, or I'll merge and the loading code will get (partially) updated later.
src/MagnumPlugins/BasisImageConverter/Test/BasisImageConverterTest.cpp
Outdated
Show resolved
Hide resolved
I think it's okay to do that later, otherwise this PR might get stalled out needlessly. Sometimes things come up etc. and this is just a convenient doc detail. I reverted back to |
Damn, I thought it is possible to slice a const view to single channels at least, sorry. I'll fix that, those getters should return a |
Squashed a bit and merged as a18f9d8...e327796. I reverted back to In any case, thanks a lot for this! |
Adds support for HDR format encoding and transcoding to
BasisImageConverter
andBasisImporter
. UASTC HDR support got added to Basis in version 1.50.The limitations for HDR currently are:
Depends on #119.
Todos:
update example code for supported format detection coderequires_ldr
and_hdr
pseudo extensions for profiles ofWEBGL_compressed_texture_astc