Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Firefox 64 and WebGL #15419

Closed
crazyquark opened this issue Dec 12, 2018 · 9 comments
Closed

Issue with Firefox 64 and WebGL #15419

crazyquark opened this issue Dec 12, 2018 · 9 comments
Milestone

Comments

@crazyquark
Copy link

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

@crazyquark crazyquark changed the title Using ZeroTextureData in Firefox 64+ spams this warning Issue with Firefox 64 and webgl Dec 12, 2018
@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 12, 2018

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.

@crazyquark
Copy link
Author

OK, I will try to edit it.

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 12, 2018

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.

@Mugen87 Mugen87 changed the title Issue with Firefox 64 and webgl Issue with Firefox 64 and WebGL Dec 12, 2018
@crazyquark
Copy link
Author

crazyquark commented Dec 12, 2018

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

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

@crazyquark
Copy link
Author

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

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 12, 2018

I've debugged the issue and I think the problem is right here:

_renderer.setRenderTarget( shadowMap );
_renderer.clear();

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.

@mrdoob mrdoob added this to the r100 milestone Dec 13, 2018
@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 13, 2018

@RemusMar
Copy link
Contributor

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

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 13, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants