Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

texImage2D: width or height out of range, chrome 24

I just started looking into the good stuff Three.js has to offer.

Now while trying to render a sphere with a texture I run into a problem.

I created a photosphere image and tried to load it onto a sphere.

I am using the WebGL renderer build into Three.js (got the latest zip from GIThub).

Two things are puzzeling me:

  1. The sphere including texture is rendered perfectly in both FF and Safari, but not in Chrome (24.0.1312.52).
  2. When I try another picture, from the example of @kennydude on github, it does work in all three tested browsers.

The only sign of something going wrong in Chrome I get is this warning:

WebGL: INVALID_VALUE: texImage2D: width or height out of range

My script is completely based on the example of @kennydude. I traced the error all the way back into the Three.js file r. 55 on line 25330. That is as far as I can get.

To get webGL running in Chrome I disabled the blacklist (my GPU appeared on that list).

Any ideas? Any help would be highly appreciated.

like image 505
Bart Avatar asked Jan 19 '13 12:01

Bart


1 Answers

Try resizing the image to a power of two size like 4096x1024.

like image 68
mrdoob Avatar answered Nov 13 '22 02:11

mrdoob