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

Textures are flipped by Y-Axis #711

Open
stevan-voste opened this issue Aug 14, 2024 · 2 comments
Open

Textures are flipped by Y-Axis #711

stevan-voste opened this issue Aug 14, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@stevan-voste
Copy link

I’m encountering an issue with an imported GLTF model that uses KTX textures on an iOS device.
The textures appear to be flipped along the Y-axis, but this only occurs on the device; everything works fine in the editor.

Note: I am using URP, and shaders are imported via shader variants

Files
glb file to test
Attach or link to .gltf/.glb files that trigger the bug.

To Reproduce
Steps to reproduce the behavior:

  1. Create empty Unity project with URP
  2. Import provided model
  3. Build project on iOS device
  4. See error

Expected behavior
Model textures are not flipped

Screenshots
In application
image

In editor
image

  • glTFast version 6.7.1

  • ktx: version 3.4.1

  • Unity Editor version 2022.3.41

  • Universal Render Pipeline 14.0.11

  • iOS

  • Device: iPhone14 Pro

  • OS : iOS 17.5.1

@stevan-voste stevan-voste added the bug Something isn't working label Aug 14, 2024
@atteneder atteneder self-assigned this Aug 23, 2024
@atteneder
Copy link
Owner

Thanks for reporting!

To certify, you're not loading said model at runtime, but you've imported it (placed it in the Assets folder), right?

@atteneder
Copy link
Owner

I assumed that you imported at design-time and tried to reproduce.

TL;DR: Don't use KTX for this use case, but go with regular PNG/JPGs in glTF.

I think you entered unexplored territory there. The KTX for Unity plugin can import those bundled KTX textures, but it just transcodes them to a format your host computer supports (the machine you develop on). So my first attempt to re-produce failed, because on the Intel Mac it was transcoded to DXT, which is not supported on my iPhone. On an ARM Mac, it is transcoded to ETC and I did not see a problem.

You could try to figure out, which format you actually end up with.

But overall, this KTX workflow does not make sense to me at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants