Viewer v2 began to ask for the Standard Material

Here is the demo with 7.49.0 - https://codepen.io/eldinor/full/YPzVdLO
(WebGL by default)
If you change the Viewer version to 7.50.0 or higher there will be the next errors:
(WebGPU by default)

I believe this is related to WebGPU. The only way to avoid errors is to add engine="WebGL" to Viewer attributes inside each <babylon-viewer> tag (or not use the environment attribute). Is there a way to use WebGPU engine in such cases?

cc @ryantrem

Strange, haven’t seen this before, but will take a look soon (maybe not until next week). Thank you for reporting this!

1 Like

Bug is understood, PR to fix the issue here: Allow engine instance to be passed to LoadImage by ryantrem · Pull Request #16255 · BabylonJS/Babylon.js

2 Likes

Verified it is working as expected with the latest package. Here is an updated version of your demo app:

https://codepen.io/ryantrem/pen/OPJgyBv

3 Likes

The error returns in 7.52.3

Thanks, on it!

1 Like

Fix was merged in this PR: Add a _hasDefaultMaterial property by ryantrem · Pull Request #16305 · BabylonJS/Babylon.js · GitHub

Also added an automated test that should prevent this regression going forward: Viewer: add test for successfully loading an env and rendering at least one frame without errors by ryantrem · Pull Request #16310 · BabylonJS/Babylon.js · GitHub

2 Likes

Verifed your demo is fixed with the latest build: Babylon Viewer v2 + Swiper

2 Likes