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

iOS GLES2 Material with VideoRam texture leeds to black screen #35851

Open
Tobi-La opened this issue Feb 2, 2020 · 7 comments
Open

iOS GLES2 Material with VideoRam texture leeds to black screen #35851

Tobi-La opened this issue Feb 2, 2020 · 7 comments

Comments

@Tobi-La
Copy link

Tobi-La commented Feb 2, 2020

Godot version:
3.1.2 stable
OS/device including version:
iPhone 6s, iOS 13.3.1
Issue description:
When you have a scene with a material, that uses a texture which is imported in Video Ram mode, the game does not render the scene and shows only a black screen.
Steps to reproduce:

  • Create a GLES2 scene with a mesh
  • Assign a material to the mesh
  • Set an png as the texture with was imported in mode "Video Ram"

Minimal reproduction project:
ioSGLES2.zip

@Calinou
Copy link
Member

Calinou commented Feb 2, 2020

Do iPhones support ETC1 texture compression? If not, you'll have to generate PVRTC-compressed textures using an external tool. Unfortunately, this process is undocumented.

@Tobi-La
Copy link
Author

Tobi-La commented Feb 2, 2020

I tried checking pvrtc here, but it unfortunately didn't work:
grafik

Can you give me some more hints to get started? Or is there any other workaround? When using lossy textures I get crashes, it seems to me when I render multiple objects. Single objects seem to work fine.

@Calinou
Copy link
Member

Calinou commented Feb 2, 2020

@Tobi-La The built-in PVRTC encoder option is broken according to #28669. This is why you'll have to call the encoder manually and store the resulting files somewhere in the project folder.

@Tobi-La
Copy link
Author

Tobi-La commented Feb 2, 2020

How do I know where to store them? And do you knwo a tool that can do that?

@Calinou
Copy link
Member

Calinou commented Feb 2, 2020

How do I know where to store them? And do you knwo a tool that can do that?

You can place them anywhere. Placing them in the same directory as the uncompressed images makes sense. You'll just have to specify the path to the compressed image in the MeshInstance's material. However, this will most likely cause the texture to stop displaying on desktop (as PVRTC is only supported on iOS).

As for obtaining PVRTexToolCLI, it seems it's now part of the PowerVR SDK available here. (Unfortunately, there's no minimal installation that contains just the required executable.)

@Tobi-La
Copy link
Author

Tobi-La commented Feb 2, 2020

I have the following options to encode:
grafik

I tried the first and load it as a texture, but it doesn't load:

modules/pvr/texture_loader_pvr.cpp:73 - Condition "hsize != 52" is true. Returned: RES()
Failed loading resource: res://textures/myTexture.pvr.

Which mode do I have to use?

@Tobi-La
Copy link
Author

Tobi-La commented Feb 4, 2020

@Calinou I tried all available options, but all of them generate the same error. I set this as the texture albedo directly, may that be wrong?

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

No branches or pull requests

3 participants