Issue with texSubImage2D

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

Author: Fantashit

1 thought on “Issue with texSubImage2D

  1. 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.

Comments are closed.