Closed
Description
Description
When loading the attached sample file (and textures) with MaterialXLoader, a shader error is thrown:
(Side note, I find it confusing that shader errors are now logged as warnings on WebGPURenderer, despite them still fully stopping the render loop.)
Reproduction steps
- Go to https://academysoftwarefoundation.github.io/MaterialX/
- In the top left dropdown, select "standard_surface_brick_procedural.mtlx"
- Play with the parameters on the right side
- Download the files (standard_surface_brick_procedural.zip)
- Load with MaterialXLoader
- Note the exception.
Code
// MaterialX
const mtlxLoader = new MaterialXLoader();
const path = "https://raw.githubusercontent.com/AcademySoftwareFoundation/MaterialX/main/resources/Materials/Examples/StandardSurface/";
const file = "standard_surface_brick_procedural.mtlx";
mtlxLoader
.setPath( path )
.loadAsync( file )
.then( ({ materials}) => {
console.log("Loaded materials", materials);
const firstMaterial = Object.values( materials )[0];
mesh.material = firstMaterial;
// should be able to adjust procedural parameters here
});
Live example
https://jsfiddle.net/w6uqog3n/16/
Screenshots

Version
r167
Device
No response
Browser
No response
OS
No response
Activity