Improve VRAM texture compression checks for mobile/web
For HTML5, we need to support S3TC if running on desktop, and ETC or ETC2 for mobile, so make this explicit. Add logic to check for ETC2 support on GLES3, and remove incorrect ETC feature for GLES3 on Android. Fix ETC check invalidating templates on HTML5. Fixes #26476.
This commit is contained in:
@@ -1114,16 +1114,10 @@ public:
|
||||
public:
|
||||
virtual void get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
|
||||
|
||||
// Re-enable when a GLES 2.0 backend is read
|
||||
/*int api = p_preset->get("graphics/api");
|
||||
if (api == 0)
|
||||
r_features->push_back("etc");
|
||||
else*/
|
||||
String driver = ProjectSettings::get_singleton()->get("rendering/quality/driver/driver_name");
|
||||
if (driver == "GLES2" || driver == "GLES3") {
|
||||
if (driver == "GLES2") {
|
||||
r_features->push_back("etc");
|
||||
}
|
||||
if (driver == "GLES3") {
|
||||
} else if (driver == "GLES3") {
|
||||
r_features->push_back("etc2");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user