Skip to content
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

Remove support for obsolete PVRTC texture compression #3688

Closed
Calinou opened this issue Dec 17, 2021 · 2 comments · Fixed by godotengine/godot#56309
Closed

Remove support for obsolete PVRTC texture compression #3688

Calinou opened this issue Dec 17, 2021 · 2 comments · Fixed by godotengine/godot#56309

Comments

@Calinou
Copy link
Member

Calinou commented Dec 17, 2021

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

On iOS, the PVRTC VRAM compression format used to be king. This iOS-exclusive compression format offered the ability to store very small textures (albeit at a low quality). In iOS gaming's early days, this was valuable as memory was limited and GPUs were slow. However, iOS devices have grown a lot in terms of GPU power and memory available since the early days. Higher-quality VRAM compression algorithms such as ETC2 are now viable, even on older/budget iPhone models (by today's standards).

The other issue is that the Godot editor's support for PVRTC isn't quite user-friendly. While the Godot editor has support for invoking an external PVRTC compression tool, this is poorly documented and it doesn't work with all command-line PVRTC tools (you need to get the "right" one). This meant that most developers did not bother with PVRTC compression and used ETC1 (GLES2) or ETC2 (GLES3) instead.

See also a list of open issues about PVRTC.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Remove support for PVRTC texture compression in the editor and engine.

This won't affect the workflow of game developers targeting any other platform than iOS. For developers targeting iOS, this will only affect their workflow if they previously used PVRTC-compressed textures (which is unlikely, especially in 2D games).

etcpak made it possible to speed up ETC2 compression significantly, so the compression time argument that may have made PVRTC desirable no longer applies.

This should allow for decreasing the engine binary size slightly, along with providing fewer poorly-supported options (which isn't conductive to a good developer experience).

Another benefit is that you are now encouraged to use the same texture compression format to target both iOS and Android1. This means you don't have to bother setting up a PVRTC compression tool to get "optimal" results on each platform (even though PVRTC's visual quality tended to be poor).

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

See all instances of pvrtc in the codebase: https://github.com/godotengine/godot/search?q=pvrtc

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, as PVRTC compression support is part of the engine itself.

Is there a reason why this should be core and not an add-on in the asset library?

This is core editor/rendering functionality.

Footnotes

  1. Godot 4.x will only feature Vulkan and GLES3 support, so ETC2 support is now assumed to be always available on Android.

@larssteenhoff
Copy link

I think you can indeed remove it.
For older projects that used it in the past they can still use it on the current version. Just not in newer versions.

@akien-mga
Copy link
Member

akien-mga commented Jan 12, 2022

I tried asking on Twitter if anyone still uses PVRTC support in Godot currently, no answer so far.
https://twitter.com/Akien/status/1479469578271006725

So I think we can go ahead with this and remove the (very barebones) support in Godot 4. If some users come with a need for it, it would likely be worth reimplementing in a better way anyway (e.g. via basis?) instead of what we had until now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants