Setting texture repeat to repeatWrapping causing error GL_INVALID_OPERATION: Level of detail outside of range

Hi all,

I am using Three 0.138.2 (updated from 0.137.x and below - at these versions had never seen this issue) and am having trouble applying initial textures to a glb. The texture appears to apply as matte black and I get the warnings in the image below. Though if I load an image after the initial paint and apply it to the material map, it works as expected. I have noticed that this error doesn’t occur if I don’t set repeatWrapping – hence the title (and in this case the texture is visible, just not making use of the repeat settings).
Please excuse me in advance if this has been covered – I wasn’t able to find any info on this.
If anyone has any advice it would be greatly appreciated!

I was using useTexture from Drei – using useLoader with TextureLoader works as intended. I think this issue is better suited for Drei discussions specifically.

I’m using r139 and this happens for me as well, with vanilla three.js, no Drei (no idea even what that is). Any explanations why this happens?

Found that this was a bug that was fixed in r140 here.

1 Like