-
Notifications
You must be signed in to change notification settings - Fork 7
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
Decode BasisU textures to BCn format instead of RGBA8 #474
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.
One question but otherwise looks good.
src/core/src/Context.cpp
Outdated
@@ -637,6 +641,15 @@ const pxr::TfToken& Context::getCesiumMdlPathToken() const { | |||
return _cesiumMdlPathToken; | |||
} | |||
|
|||
bool Context::isCompressedTexturesSupported() const { | |||
// Compressed textures do not work in Kit 105.0 or 105.0.1 | |||
if (_kitVersion.rfind("105.0", 0) == 0) { |
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.
Is this even necessary? We just released version 0.11.0 which claims that versions less than 105.1 are unsupported.
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.
Oh good point... I'll remove it
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 think I worked on this PR before realizing that 0.11.0 wouldn't be backwards compatible with Kit 105.0
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.
In that case do we even need any of the code to pass the kit version up to the native layer?
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.
Nope, I just removed it all
… on kit version" This reverts commit d31637e.
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.
Looks great and works great.
Fixes #266
Previously, compressed textures were decoded to RGBA8 instead of the native BCn format due to a limitation in Kit 105.0. Now with Kit 105.1 we can decode to BCn and keep the data compressed on the GPU. This involves a bit of a strange workaround with the
stride
parameter (see comments in the code).Test data:
agi-ktx2-explicit.zip
agi-ktx.usda.zip