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.
Non-power-of-2 texture render warning in chrome
Asked Answered
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 renderable –
Goulden
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;
If you're texture is not a pow of 2 size one, don't use (or do disable) mippmapping on that texture minifier method.
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.
© 2022 - 2024 — McMap. All rights reserved.