-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add iOS Support #219
Add iOS Support #219
Conversation
Thank you, I will review and test a bit more. We won't be defaulting the demo project to etc2, but we can document that it's needed for ios and android so people can setup their own files. Unity recommends: And Android says ETC2, which covers 87% of devices. ETC1 doesn't support alpha so it's not an option. ASTC is 77% of devices. DXT1/5 virtually unsupported. This article says the following which suggests why you were able to use DDS/DXT files after enabling ETC2 in the project settings, even though the hardware doesn't support it. Somewhere it's likely being converted from DXT to ETC2:
|
Thanks for the help! In particular I don't know much about texture formats (compression etc.), I just tinker to get something working. It makes sense not to default the demo to etc2 (and you may want to change/remove the icon too?) -- there are more setup steps for mobile anyway. I went ahead and removed the etc2 project change. Let me know if you want something else to help get this in, but otherwise I'm quite happy to keep tinkering with this change in my project. |
FYI, I will work on this and get it in as part of 0.8.4, after I'm done with changing the control map format, adding holes, and merging in the shader rewriting I've been doing. I need to test etc2 / astc and the image formats. You can remove the icon and squash your commits. I'll need to write up a wiki page for Mobile and let people know they need to enable this setting in their project settings: I also need to create a github action to build IOS automatically. I have an old iphone 7 w/ v15.7.9 and no mac. If I have github build it, is there a way I can export the demo from my windows pc and load it on my phone? Thanks |
Cool, I'm happy to try those things. I can sync/squash next week, but I think the icon is required to export to iOS. I don't know about github build, but I don't think you can build for iPhone from Windows. I think you need XCode on Mac OS and developer credentials. |
Ah, you don't want to merge. There's almost never a reason to use In the future, what you want to do is a rebase off of the latest commit as described in the godot pull request workflow.
https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html#updating-your-branch However, what you want to do now is an interactive rebase and delete that merge commit. Then you might need to do the rebase above if it is still needed. https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html#the-interactive-rebase
3 for the three commits you have, change command in front of the merge commit to drop. |
I tested this today. I was delaying because I needed to test the This change allows the user to insert PNGs that have not been imported according to the docs. By default PNGs are imported as "Lossless" and are straight RGBA8. However when used this way, they don't work very well, not with multiple textures in the array, and produce errors in the console, so we can't allow that. When PNGs are properly imported as VRAM Compressed, Godot reports it as DXT5, and a DXT5 s3tc.ctex file is created.
If the import etc2 is selected in the project settings, it also makes an etc2.ctex file. Both the DXT5 and ETC2 file exist in the
Godot has a format for this: There's also a variety of other options. I assume you can't get a console on ios. But you could load an exported PNG file and display the format on screen in the UI if 27 doesn't work. With etc2 enabled in the project settings, when I double-click the png, the DXT5 file displays in the inspector. The etc2 file must only be used on export. So yes, we can leave it on in the project settings as it won't affect desktop at all. In the documentation we can let them know etc2 must be enabled in project settings and on export. I exported a windows PCK file as a zip and looked for rock028* (from DDS). There are no ctex files for it. There are only dds files because they don't get imported(converted). So there is no DXT5 -> ETC2 conversion. Since DXT doesn't work on mobiles, that's why you got a checkered display. I exported an IOS pck as zip and looked for my rock030 (from PNGs). The PNGs are gone from the textures folder, and the s3tc.ctex files are gone from the import. What we do have are .etc2.ctex files in import. So mobile games need to use PNG imported as VRAM Compressed. Not DDS. Please test to make sure format 27 works for the validator. The only thing that's confusing for me is how you got the DXT5 grass texture to show up in your screenshot? Did you convert the DDS file to another format in photoshop? It is not RGBA8, so why does your console report it as 5? Your export .pck is a zip file. What rock028* files do you have in .godot and in the file system? If it's just the rock028_alb_ht.dds then I'm totally confused how. I expect there should be an etc2.ctex file and a PNG version of the file or something in there. |
- Adds iOS universal library paths to terrain.gdextension - Adds icon and project reference for iOS - Modifies terrain_3d_texture to allow
I updated this PR:
Thanks for all of the testing before to produce this PR. We need more testing on IOS now that these PRs are in. |
Reviewer Edit:
Fixes #218