-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Export: Unify settings for PC texture formats, removed obsoleted ETC feature #88325
Conversation
@@ -237,9 +239,8 @@ void EditorExportPlatformPC::set_logo(const Ref<Texture2D> &p_logo) { | |||
} | |||
|
|||
void EditorExportPlatformPC::get_platform_features(List<String> *r_features) const { | |||
r_features->push_back("pc"); //all pcs support "pc" | |||
r_features->push_back("s3tc"); //all pcs support "s3tc" compression |
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.
Removed this, which is redundant with the above logic, and also wrong if users for some reason decide to export ETC2/ASTC and not S3TC/BPTC.
648a241
to
811b270
Compare
Co-authored-by: BlueCube3310 <[email protected]>
S3TC and BPTC should always be used together, and likewise for ETC2 and ASTC.
811b270
to
a10b4bd
Compare
} else if (RS::get_singleton()->has_os_feature("etc2")) { | ||
ktxfmt = KTX_TTF_ETC1_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.
I kept KTX_TTF_ETC1_RGB
here as we seem to handle only RGB here.
The options are:
// ETC1-2
KTX_TTF_ETC1_RGB = 0,
/*!< Opaque only. Returns RGB or alpha data, if
KTX_TF_TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS flag is
specified. */
KTX_TTF_ETC2_RGBA = 1,
/*!< Opaque+alpha. EAC_A8 block followed by an ETC1 block. The
alpha channel will be opaque for textures without an alpha
channel. */
// Values for automatic selection of RGB or RGBA depending if alpha
// present.
KTX_TTF_ETC = 22,
/*!< Automatically selects @c KTX_TTF_ETC1_RGB or
@c KTX_TTF_ETC2_RGBA according to presence of alpha. */
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.
The color data encoding is ETC1 for all of them anyway, so there should not be any quality difference.
I took an initial look at this, but we probably need to try the pr on all the devices on platforms we support like:
|
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 to me!
S3TC and BPTC should always be used together, and likewise for ETC2 and ASTC.
Also removes obsolete ETC support code since we removed that format.
I didn't add compatibility code yet, it would be a bit convoluted in
EditorExportPreset::_set
which currently has its own logic for some visibility update. Could be done but I'm not sure it's worth the bother, when handling this minor compat breakage just requires ensuring that the proper formats are toggled in the settings. The default behavior for the new options is also to export S3TC/BPTC, which is the most likely combinations that users need.Haven't tested much yet.
For a potential 4.2.x cherry-pick we might consider going with the approach in #84913 to be more conservative.