Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non-power-of-2 texture render warning in chrome

Page: http://nps.netarteria.pl/gallery/ I'm following this tutorial: https://developer.mozilla.org/en-US/docs/WebGL/Animating_textures_in_WebGL but my chrome (in inspect mode) shows this warning: 58RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'. But I am using correct filtering (non-mipmap), so I'm not sure what's wrong. Also notice bottom line of pixels in both videos - it's stretched, I'm not sure if that's related.

like image 750
NPS Avatar asked Dec 16 '12 21:12

NPS


2 Answers

I had a same problem with video texture. What you need to do is to avoid using mipmaps when texture is not power of 2 which are enabled by default:

_tmpTex.generateMipmaps = false;
_tmpTex.minFilter = THREE.LinearFilter;
_tmpTex.magFilter = THREE.LinearFilter;
like image 148
DarkoB Avatar answered Oct 18 '22 03:10

DarkoB


If you're texture is not a pow of 2 size one, don't use (or do disable) mippmapping on that texture minifier method.

like image 23
Serge Avatar answered Oct 18 '22 05:10

Serge