Hi everyone,
Didn’t find anything on the forum and I don’t know what’s happening.
TLDR;
I have this warning and I don’t know where to look further to fix it :
[.WebGL-0000530C04978D00] GL_INVALID_VALUE: Offset overflows texture dimensions.
I had a build stored on playcanvas, in version 1.62.2.
But my client’s IT department installed a firewall and blocked playcanvas (categorized as “games”).
They can’t change it yet, so I made a new downloadable build (version 1.67.3)
They are on the same plane and can (and will) have some overlapping, only visible if you use too much text. This never caused any problem for now, except slight visual glitches.
Ok so I added some options for the new texture instance. By default the texture created is 4x8 pixels, and maybe that’s what went wrong. It surely has to be somewhat close to the image used in order to work correctly.
For now it looks like it works again, but I’ll let the users also try and wait for their feedback.
let tex = new pc.Texture(pc.app.graphicsDevice, {
mipmaps: false,
width: 1200,
height: 100
});
@slimbuck this could be related to the texture upload changes. But as long as it works now, I think that’s fine. It seems like this was creating a texture without specifying a correct size.
Do you have a repro you can share with us? As @mvaligursky says, we made a few changes around updating textures, but I think this case should be working and I would like to figure out why it didn’t.
I finally had a chance to look into this. The reason it’s failing is because the texture is sometimes being rendered as 4x4 first, then being updated to the 1200x100 texture. (This depends on timing of the image onload callback).
This is something we should fix in the engine.
You can work around the issue on your end by moving the material update code:
const material = engraving.render.meshInstances[0].material;
material.opacityMap = newTexture;
material.update();
…into the onload handler itself. This way the texture will only get used when it’s ready.