Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
acf250a
upgraded MaterialX support
bhouston Apr 27, 2026
5c359eb
add a new more examples (open_pbr_surface + gltf_pbr)
bhouston Apr 27, 2026
afb22c9
conslidated fixed noise functions into mx_noise.js
bhouston Apr 27, 2026
05483d9
conslidate matrix inversion.
bhouston Apr 27, 2026
aeb63e7
simplify code.
bhouston Apr 27, 2026
7c5a82d
simplify MaterialXLoader code.
bhouston Apr 27, 2026
f487035
more consolidation of MaterialX nodes.
bhouston Apr 27, 2026
737721d
Fix some noise discrepancys, update noise example.
bhouston Apr 28, 2026
96cc56f
improve converter, add default color space for textures,
bhouston May 2, 2026
f29960f
fix worleynoise3d, add vector2 output.
bhouston May 3, 2026
1abb88d
fix MaterialX convert node.
bhouston May 3, 2026
8106e7c
fix mx_unifiednoise3d
bhouston May 3, 2026
cba0ab5
improved matrix33 and matrix44 support in MaterialX
bhouston May 3, 2026
a405964
support bool and numeric input to materialx bool operators.
bhouston May 3, 2026
290b15c
checkerboard improvements for materialx.
bhouston May 3, 2026
8117fb7
fix hextile support
bhouston May 4, 2026
bad73e1
add hextile example to noise exmaple.
bhouston May 4, 2026
619cf89
2D noise examples should use the UVs, not position.
bhouston May 4, 2026
b878788
update `webgpu_lights_projector` example
sunag May 5, 2026
8f176c3
update `webgpu_backdrop_water` example
sunag May 5, 2026
66a40e2
fix deepscan
sunag May 5, 2026
7c77acc
(try) fix deepscan error by gemini
sunag May 5, 2026
8f085c3
update screenshots
sunag May 5, 2026
bc45cd4
Update webgpu_loader_materialx.jpg
sunag May 5, 2026
4c2d3a3
support both UV spaces that are used in ThreeJS.
bhouston May 5, 2026
b64980e
fix ramp4, add binormal support, fix gltf_image.
bhouston May 7, 2026
95ae5ea
reduce duplication, adopt Rodrigues' rotation formula
bhouston May 7, 2026
66f26e2
add support for MaterialX image address modes.
bhouston May 7, 2026
432258f
align viewdirection and add support for world/object space. Add arti…
bhouston May 8, 2026
9499ab5
fix hextile falloff contrast
bhouston May 8, 2026
23c55a8
fix matrix order on transformpoint.
bhouston May 8, 2026
eb2f802
forgotten import
bhouston May 8, 2026
417cd4a
fix materialx bump
bhouston May 10, 2026
6e14e3f
Materialx: fix default for heighttonormal
bhouston May 10, 2026
2d1043d
MaterialX: fix hextilenormalmap
bhouston May 10, 2026
c82bb00
add support for switch
bhouston May 10, 2026
e3aad27
MaterialX: fix definition of gltf_colorimage
bhouston May 11, 2026
6cc970a
explain sign flip in Rodrigues formula.
bhouston May 11, 2026
ae8d870
fix MaterialX range with fliped bounds behavior.
bhouston May 11, 2026
a36f92e
MaterialX: fix ramptb, and range
bhouston May 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions docs/pages/MaterialXLoader.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The node materials loaded with this loader can only be used with [WebGPURenderer

```js
const loader = new MaterialXLoader().setPath( SAMPLE_PATH );
const materials = await loader.loadAsync( 'standard_surface_brass_tiled.mtlx' );
const { materials, report } = await loader.loadAsync( 'standard_surface_brass_tiled.mtlx' );
```

## Import
Expand Down Expand Up @@ -57,7 +57,29 @@ Executed when errors occur.

**Returns:** A reference to this loader.

### .parse( text : string ) : Object.<string, NodeMaterial>
### .loadAsync( url : string, onProgress : onProgressCallback, options : Object ) : Promise

Asynchronously loads a MaterialX asset.

**url**

The path/URL of the file to be loaded. This can be a `.mtlx` file, a `.mtlx.zip` package, or a data URI.

**onProgress**

Executed while the loading is in progress.

**options**

Optional MaterialX translation options.

* `materialName`: Selects one `surfacematerial` by name from a multi-material document.
* `issuePolicy`: Controls issue handling. Supported values are `warn`, `error-core`, and `error-all`.
* `onWarning`: Callback executed for structured translation warnings.

**Returns:** A promise resolving with an object containing `materials` and `report`.

### .parse( text : string, options : Object ) : Object

Parses the given MaterialX data and returns the resulting materials.

Expand All @@ -82,9 +104,23 @@ Supported standard\_surface inputs:

The raw MaterialX data as a string.

**options**

Optional MaterialX translation options. See [loadAsync](#loadAsync).

**Overrides:** [Loader#parse](Loader.html#parse)

**Returns:** A dictionary holding the parse node materials.
**Returns:** An object containing `materials` and `report`. `materials` is a dictionary holding the parsed node materials.

### .parseBuffer( data : ArrayBuffer, url : string, options : Object ) : Object

Parses raw MaterialX data from an `ArrayBuffer`, `Uint8Array`, or string. ZIP buffers are detected automatically.

**Returns:** An object containing `materials` and `report`.

### .dispose() : MaterialXLoader

Releases object URLs created while loading `.mtlx.zip` package resources.

## Source

Expand Down
Loading
Loading