Texture.upload() extremely performance hungry in FireFox

Hi @LucaHeft !

I ran into this a few months ago. There was a weird update to Firefox a few months ago that limited CPU usage on R8B8G8 but not R8B8G8A8

Changing this part of your code, or it’s equivalent, should speed things up for you:

texture = new pc.Texture(app.graphicsDevice, {
        format: pc.PIXELFORMAT_R8_G8_B8,
        autoMipmap: false
    });

to:

texture = new pc.Texture(app.graphicsDevice, {
        format: pc.PIXELFORMAT_R8_G8_B8_A8,
        autoMipmap: false
    });

Here is the thread where I made this discovery and a link to the bug filed with Mozilla.

4 Likes