I use the renderer.copyTextureToTexture method to update a texture atlas. I have noticed that some of the time the texture randomly copies the sub texture upside down. I have gone over my code multiple times and considering the texture is quite large, the code works 95% of the time, and there appears to be no pattern to the flips, it makes me believe that it may be an issue with the speed at which I update the texture.
I can't provide a code snippet, but basically, I have a function that I call every 100ms which checks to see if the textures need to be updated. If they do, it acquires a mutex, and grabs the necessary texture data from ram, then loops through the textures and copies them to the GPU using subTexImage2d. Has anyone experienced this issue before? I also noticed that the first texture copied always is flipped unless I set texture.flipY = true or surround the call with a setTimeout.... bizarre.
Three.js version 85, chrome browser
Nvidia GeForce GTX 1070 and 1060
Sorry, this is not a help site. Please use a help site for help with you app.
If you later can confirm and demonstrate a three.js bug, you may reopen this.
I suggest you avoid using a revision of three.js that is two years old. Update to the current revision.
I understand, I am being pretty vague, that is my bad. The code is pretty complex and will take time to make a general test case for, but I will work on that to demonstrate the issue. Tried using latest version of threejs and have the same issue btw. I found surrounding the calls to copytexturetotexture with setTimeouts of about 100ms and throttling the total amount of downloads to the gpu per frame(s) solved the issue for now though.
Most helpful comment
Sorry, this is not a help site. Please use a help site for help with you app.
If you later can confirm and demonstrate a three.js bug, you may reopen this.
I suggest you avoid using a revision of three.js that is two years old. Update to the current revision.