I’ve found a weird behavior in 4.2 (didn’t check earlier versions) where Dynamic textures are distorted when setting generateMipMaps to true and using a non square or non power of 2 resolution. It’s fine for 1024x1024 canvases or when not generating mipmaps. This problem seems to be confined to iOS as far as i can tell.
My current work around is to generate the original texture in a separate off screen canvas and then scaling that to the 2d context of the dynamic texture. This is no particularly elegant imho. some advice on how to say the least. Any suggestion on how to fix this would be appreciated.
Thank you for investigating. Afaik requiring WebGL2 would exclude most iOS devices. My current workaround is to compose everything in the format i was originally using, since i’m rendering fonts at runtime which would get distorted otherwise, and then scaling that to the canvas originally created for the dynamic texture which has a power of 2 format. Has surprisingly little performance impact.
Now that i think of it, maybe it would be cleaner to use the original canvas with power of 2 measurements only use the area that i originally wanted to use and adjust the UVs of the mesh accordingly. Any thoughts on that?
I’d like to see a note about this gotcha in the documentation somewhere. Can i write something up and send a pull request to the github repo or do you guys prefer to write something yourself?