Threejs Texture

Stefano Maglione picture Stefano Maglione · Apr 2, 2015 · Viewed 16k times · Source

When I execute my render of some geometry I can see in my console this warning:

THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.

I can't understand the reason and the background of my canvas is completely black.

Answer

gaitat picture gaitat · Apr 2, 2015

The size of your texture is not powers of two (ie. 16x16, 32x32, 64x64 ...).

Set yourTexture.minFilter = THREE.LinearFilter to get rid of the error message.