Texture Rendering Issues in iOS

I've been having a lot of trouble trying to render textures in iOS. (In Android, everything works as expected.)

  • Any texture image taller than 1024 pixels (seems like that is the lucky number) is rendered black.
  • Also, any texture at all applied to a model generated dynamically (using IndexBuffer and VertexBuffer) does not render either.

Are these known problems? I could paste example code if needed.

Answers

  • EgorBoEgorBo BYXamarin Team ✭✭✭

    @bunny-wabbit
    Can you please provide more details - device, OS. For example, you definitely can not use >1024*1024 textures on iphone 3G ;-). Repro projects are very welcome!
    PS: don't forget to turn off "Optimize PNG" feature in the project settings (VS\XS).

  • bunny-wabbitbunny-wabbit USMember

    I'll set up an example project and post it here shortly. Thank you!

  • bunny-wabbitbunny-wabbit USMember
    edited August 2016

    Alrighty. Here it is: https://github.com/florin-chelaru/UrhoExample

    In the meantime, I managed to figure out exactly what doesn't work in iOS. It's two problems (you can reproduce them by running the above project):

    1. Texture images need to have width and height a power of 2 (256x256, 512x512, etc.). If I do this, then textures are loaded fine, even for large images (2048x2048 for example). If the texture is for example, 500x500, then it is not rendered.

    2. Custom geometries have serious trouble rendering on iOS (not on Android) - at least on the emulator (I wasn't able to test on a real device). Here is a screenshot of how this is rendered on Android vs iOS: screenshot

  • Abhijeet_SuryaAbhijeet_Surya USMember ✭✭✭

    @bunny-wabbit

    facing the same issue, a texture is not getting applied only on iOS.

    Textures are imported using assets importer, do you have any suggestions?

Sign In or Register to comment.