Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "PERFORMANCE WARNING: Some textures are unrenderable" mean in Chrome?

Tags:

webgl

In my WebGL, in the JavaScript console, I see the warning

PERFORMANCE WARNING: Some textures are unrenderable.

What does it mean?

like image 563
gman Avatar asked May 19 '13 17:05

gman


2 Answers

WebGL must enforce OpenGL ES 2.0 behavior and prevent WebGL apps from accessing data they don't have access to. To do this WebGL implementations have to validate many things including that all the textures that will be read from are readable according to the OpenGL ES 2.0 spec with no extensions.

So, at every draw, they have to check if all the textures meet all the required criteria which includes checking that that each texture is "texture complete", if it's a cubemap that it is "cube complete" and "mipmap cube complete", if it's non-power-of-2 dimensions that texture filtering is set correctly, etc... If any of these conditions are not met the WebGL implementation will substitute a transparent black texture so that behavior will be spec compliant and consistent across devices.

These checks are expensive so a shortcut a WebGL implementation can take is to track if any textures are unrenderable. If no textures are unrenderable then no checking is needed at draw time. The warning above is that some textures are unrenderable which is basically telling you WebGL has to do all this expensive checking. If you make sure all your textures are renderable WebGL can skip this check and your app may run faster.

For definitions of "texture complete", "cube complete", etc... see OpenGL ES 2.0 spec section 3.7.10

like image 172
gman Avatar answered Nov 11 '22 16:11

gman


This could also be the result of a bug in Chrome 28: http://code.google.com/p/chromium/issues/detail?id=242321 I got this message even when my WebGL script wasn't using any textures at all.

It was fixed in Chrome 29.

like image 3
Thomas Avatar answered Nov 11 '22 18:11

Thomas