Non-power-of-2 texture render warning in chrome
Asked Answered
Q

3

7

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.

Quick answered 16/12, 2012 at 21:28 Comment(3)
are you sure it's the video that it's complaining about?Goulden
Seems like it. Everything else is power-of-2 (right now I even changed other non-power-of-2 images to check if it's still complaining and it is).Quick
Another idea. Is it possible it's complaining about a texture that has not yet been defined? For example does your code create a texture and then start rendering with it immediately even though the video has not started and texImage2D has not been called? I generally create textures of size 1x1 for async loaded textures so they start as renderableGoulden
A
7

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;
Athos answered 23/1, 2014 at 18:49 Comment(0)
N
1

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

Neighbor answered 21/3, 2013 at 11:28 Comment(0)
C
0

Putting gman's comment into an answer (it worked for me):

Make sure you are loading the image and calling `texImage2D' BEFORE you render the image.

Comedown answered 22/11, 2013 at 0:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.