My issue involves the automatic resizing of textures by WebGLRenderer
in threejs.
I understand that WebGL requires textures to have dimensions that are powers of 2.
In my case, the texture has a wrap set as RepeatWrapping and a size of 65536 x 512, which is equivalent to 2^16 x 2^9
Even though I believe the size of the texture is correct, the console displays the message:
THREE.WebGLRenderer: Texture has been resized from (65536x512) to (16384x128)
The downsizing of the texture significantly impacts the quality of the rendered image, which is not ideal.
Despite following the documentation, I am unsure where I am going wrong.
Is there a way to prevent this downsizing?
For reference, here is the code snippet for loading textures:
const texture = new TextureLoader().load(path);
texture.anisotropy = 2;
texture.magFilter = LinearFilter;
texture.minFilter = LinearFilter;
texture.wrapS = RepeatWrapping;
texture.wrapT = RepeatWrapping;
texture.repeat.set(1 / tilesAmountHorizontally, 1 / tilesAmountVertically);