Hi all, I found a problem where a canvas texture used as an opacity map disappears when running in WebGPU, but it works fine in WebGL.
Steps to reproduce:
- Create a texture using a canvas as the source. (setSource)
- Assign this texture to the material’s opacity map.
- Apply the material to an image element.
Here is the sample code and project to check the result.
const canvas = document.createElement('canvas');
// draw something...
const texture = new pc.Texture(this.app.graphicsDevice);
texture.setSource(canvas);
const material = new pc.StandardMaterial();
material.opacityMap = texture;
material.opacityMapChannel = 'r';
material.blendType = pc.BLEND_PREMULTIPLIED;
entityA.element.material = material;
entityB.render.material = material; // also disappears on render component
https://playcanvas.com/project/1411213/overview/webgpu-setsource-test
Thank you in advance for your help!
