Hi!
I’ve got an asset that when i load it in my app with GPUEngine on, it throws a ton of errors about a texture not being the right size. However when i load the asset in a PG with WebGPU on, i don’t get the same error.
Here, you can see it breaking my app:
And here, running with same build with webgpu turned off:
Here is a PG where it doesn’t break with GPU on. Not sure what the different might be? Maybe with how the engine is configured (see below): https://playground.babylonjs.com/?webgpu#WF3VKZ#532
the code that turns on the engine is this:
StartBabylon.prototype.createEngine = async function(canvas) {
console.log('StartBabylon-createEngine')
this.mlog.log('StartBabylon-createEngine - evaluating GPU', {}, 1);
this.webGPUSupported = await (BABYLON.WebGPUEngine).IsSupportedAsync;
//get params from URL to see if webgpu is there.
let webgpu = getUrlParameter('webgpu');
let engine;
if (this.webGPUSupported && webgpu != undefined && webgpu != false) {
console.log('StartBabylon-createEngine - webGPUSupported and requested in param', {'webgpu':webgpu}, 1);
engine = new BABYLON.WebGPUEngine(canvas);
await engine.initAsync();
} else {
console.log('StartBabylon-createEngine - NON webGPUSupported', {'webgpu':webgpu}, 1);
engine = new BABYLON.Engine(canvas, true, { preserveDrawingBuffer: true, stencil: true, disableWebGL2Support: false }); // Generate the BABYLON 3D engine
engine.enableOfflineSupport = false;
engine.setHardwareScalingLevel(1 / window.devicePixelRatio); //enables crisp text in gui
}
return engine;
}