If I build to windows I do not get this issue. If I scale a primitive cube it’s UV map gets hosed. In my particular example I’ve scaled a cube by 200. It’s texture continues to map normally in the editor and a windows build but does not to WebGL. Am i missing something?
editor
webGL
Can you file a bug with a repro case for us to look at and post the case number here?
Hey Jonas, certainly; Case # 776525 . Thank you.
So, what is going on here is that you are using an NPOT texture with mip maps enabled. This combination is not supported by WebGL 1.0 or OpenGL ES 2.0 (WebGL 2.0 and OpenGL ES 3.0 support it). Unity will try to work around this by either scaling the texture up (when the “Texture Type” in the texture importer is set to “Texture”), or to pad it (when the “Texture Type” in the texture importer is set to “Sprite”). Unity’s UI and Sprite rendering code will know about this and compensate for the padding, so you can still have pixel-precise UI rendering. But for a mesh with arbitrary UVs, we cannot automatically compensate, as we don’t know what kind of wrapping is expected. So, to fix this, you either need to:
-Import the texture as “Texture”, not as “Sprite”, as that is how you use it
-Disable Mipmaps
-Change the texture to have power-of-two dimensions
Ah, thank you! Assumed I was doing something. That makes perfect sense.