godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.15k stars 21.19k forks source link

Export issue using different renderers per platform via feature tags #28662

Open DrMoriarty opened 5 years ago

DrMoriarty commented 5 years ago

Godot version:

Godot 3.1.2-devel

OS/device including version:

MacOSX 10.13.6 iOS 12.1.2

Issue description:

As I described in #28621, I many times changed export compression mode for my graphics files. One time I disabled S3TC compression format and when I try to reimport files I get a lot of errors about loading images on PC (I don't export for PC/Mac so I tried to ignore this error). Finally I enabled S3TC compression because it bloated me by error messages. So I reimport my images again (as vram compression) and now them can not be loaded on my iOS device. It doesn't show any error when reimport images or when making export package. But in runtime game crashed and showed in logs messages about that problem files:

2019-05-04 01:10:25.474821+0300 galactic-adventure-2[7799:5271607] **ERROR**: res://GUI/Presenting/Presenting.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://LevelScreen/backgrounds/paralax-1.png

I tried to reimport that images in Lossy compression mode - it works! I changed compression format to video ram - it doesn't work. I closed godot, removed *.import files and all related files in my .import folder. Then I started godot again, it imported my images. While them in lossless/lossy format - they works. As I change them to video ram format - the game can not find them in runtime.

What should I clean in order to restore the original state? These files worked yesterday and iOS build worked flawlessly.

Steps to reproduce:

Minimal reproduction project:

DrMoriarty commented 5 years ago

It is insane and nightmare. In order to get my iOS build workable I have to do following: 1) Reset godot from GLES2 mode to GLES3 (restart). 2) Enable ETC2 compression format (restart & reimport all vram textures) 3) Export to iOS and voila! It works. Related #28596 I'm making android and iOS export for different GLES versions. So I have to set godot in the same GLES to make workable export.

Calinou commented 5 years ago

I'm making android and iOS export for different GLES versions. So I have to set godot in the same GLES to make workable export.

Please note that we don't officially support using multiple renderers in the same project. Due to vastly differing feature sets and visuals, we don't consider GLES2 to be a drop-in replacement for GLES3 (and vice versa).

DrMoriarty commented 5 years ago

@Calinou Ok. I'm using 1 (one) renderer in Android build (it is GLES2) and 1 (one) renderer in iOS build (it is GLES3). I'm not using multiple renderers in one build and I don't use fallback to GLES2 from GLES3. I want to separate export driver version from godot using driver version. Why I can not use this project settings?

rendering/quality/driver/driver_name = GLES3
rendering/quality/driver/driver_name.iOS = GLES3
rendering/quality/driver/driver_name.Android = GLES2

Actually I can't use them because godot will prohibit android exporting. (#28596) Ok. I can change them to:

rendering/quality/driver/driver_name = GLES2
rendering/quality/driver/driver_name.iOS = GLES3
rendering/quality/driver/driver_name.Android = GLES2

Fail again! I can't use them because Godot will export iOS build without any vram textures!

Calinou commented 5 years ago

@DrMoriarty I said we don't support using multiple renderers per project, not per build :slightly_smiling_face:

A project being exported to multiple platforms is still a single project.

DrMoriarty commented 5 years ago

@Calinou Ok, I will prepare PR for that.

akien-mga commented 5 years ago

This is a corner use case, but yes, it should be made possible without so much hassle.

akien-mga commented 5 years ago

You can start by checking #26523 to see what is the relevant code that blocks this use case right now.

HEAVYPOLY commented 4 years ago

Want to add +1 here. My project is GLES2 for all platform except iOS, where I switch to GLES3 for export each time because GLES2 produces bugs.