-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix KTX texture format for latest version #2845
Conversation
Thanks! We should also remove the last case in the switch in toPixelDataFormat in |
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.
Thanks for the fix! Let's also remove the last case in the switch in toPixelDataFormat in KtxUtility.h.
@@ -933,7 +933,7 @@ void iblRoughnessPrefilter( | |||
.endianness = KtxBundle::ENDIAN_DEFAULT, | |||
.glType = KtxBundle::R11F_G11F_B10F, | |||
.glTypeSize = 1, | |||
.glFormat = KtxBundle::R11F_G11F_B10F, |
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.
Why was this removed? We need this format for our IBLs. It breaks all environment lighting.
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.
We're still using the 11_11_10 (see the glType
field), this needed to be unsized to be valid KTX. Is stuff breaking for you?
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.
Actually the issue isn't here. The issue is above.
@@ -933,7 +933,7 @@ void iblRoughnessPrefilter( | |||
.endianness = KtxBundle::ENDIAN_DEFAULT, | |||
.glType = KtxBundle::R11F_G11F_B10F, | |||
.glTypeSize = 1, | |||
.glFormat = KtxBundle::R11F_G11F_B10F, |
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.
Actually the issue isn't here. The issue is above.
@@ -227,7 +227,6 @@ namespace ktx { | |||
case KtxBundle::RG: return PixelDataFormat::RG; | |||
case KtxBundle::RGB: return PixelDataFormat::RGB; | |||
case KtxBundle::RGBA: return PixelDataFormat::RGBA; | |||
case KtxBundle::R11F_G11F_B10F: return PixelDataFormat::RGB; |
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.
Removing this line breaks compatibility with existing assets.
The *_ibl.ktx and *_skybox.ktx files generated by cmgen cannot be read in the latest KTX release (v4.0.0-beta3). This is because
glFormat
should be unsized, according to spec (so it should be RGB).