Three.js: Issue with Firefox 64 and WebGL

Created on 12 Dec 2018  路  9Comments  路  Source: mrdoob/three.js

Using the latest Firefox 64(or Firefox Developer edition) you get this warning all the time:
Error: WebGL warning: clear: This operation requires zeroing texture data. This is slow.
You can reproduce this in a lot of the three.js official examples like:
https://threejs.org/examples/#webgl_animation_cloth for example.

There is a reference in the Gecko code about this here:
https://github.com/mozilla/gecko-dev/blob/1cdb198bd9e1d2605ac48d2588e29475fb01a74e/dom/canvas/WebGLTexture.cpp#L636-L647

Browser Issue

Most helpful comment

You won't get this warning in the upcoming Firefox 65.

All 9 comments

Yes, I can reproduce the warning with FF 64.0 and Mac OS 10.14.1. I think it makes sense to create a small fiddle that produces such a warning in order to better understand why this happens.

OK, I will try to edit it.

Wait, I already have a fiddle^^:

https://jsfiddle.net/f2Lommf5/16472/

Looks like it happens as soon as a shadow map is rendered. Can you confirm that the warning is logged on your machine? It should also disappear if you disable shadow maps.

Yes, I have deduced the same thing:
https://jsfiddle.net/f2Lommf5/16480/

Adding a light and enabling shadowMap on the renderer triggers it.

Yes, I can see the warning on your fiddle as well.
Disabling the shadowMap removes the warning.

I've debugged the issue and I think the problem is right here:
https://github.com/mrdoob/three.js/blob/3013895bf68ad0c27fb0f9d3ca0beea2c0e7a87a/src/renderers/webgl/WebGLShadowMap.js#L225-L226

The shadow map's render target is cleared right after its creation. You can simulate the same with the following fiddle:

https://jsfiddle.net/f2Lommf5/16484/

No problem in Chrome but FF logs the respective warning.

You won't get this warning in the upcoming Firefox 65.

Indeed, with Firefox Beta (65.0b4) I'm not able to reproduce the warning on macOS.

Was this page helpful?
0 / 5 - 0 ratings