Stefano Maglione
Stefano Maglione

Reputation: 4150

Threejs Texture

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.

Upvotes: 23

Views: 17401

Answers (1)

gaitat
gaitat

Reputation: 12632

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.

Upvotes: 37

Related Questions