@needle-tools/materialx 1.6.0-next.2af5fc1 → 1.7.0-next.0d06218

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.7.0] - 2026-05-21
8
+
9
+ ### Added
10
+ - Runtime environment radiance modes for fast Three.js PMREM sampling, MaterialX prefiltered latlong sampling, and MaterialX filtered importance sampling.
11
+ - MaterialX viewer examples for material library inspection, PMREM comparison, shaderball previews, configurable environments, and graph-driven material loading.
12
+
13
+ ### Changed
14
+ - Rebuilt the bundled MaterialX runtime to 1.39.5.
15
+ - Improved texture sampling, alpha-mode render state, environment rotation, and PMREM handling for Three.js integration.
16
+
17
+ ### Fixed
18
+ - Corrected material parameter editing for color values, environment controls, and graph-loaded materials in the viewer examples.
19
+ - Kept viewer debug panels and camera controls consistent across the material library, graph, shadows, and complex scenes.
20
+
7
21
  ## [1.6.0] – 2026-04-01
8
22
 
9
23
  ### Added
@@ -108,4 +122,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
108
122
  - Fix: Texture loading and glTF texture index resolution
109
123
 
110
124
  ## [1.0.1] - 2025-07-08
111
- - Initial release
125
+ - Initial release
package/README.md CHANGED
@@ -43,6 +43,39 @@ MaterialX shaders will create `MaterialXMaterial` materials at runtime. These ar
43
43
 
44
44
  [Learn more in the Needle Engine documentation](https://engine.needle.tools/docs/how-to-guides/export/materialx.html)
45
45
 
46
+ ## Notes
47
+
48
+ ### Anisotropy and environment lighting
49
+
50
+ The public `environmentRadianceMode` option is a string enum with three modes:
51
+
52
+ - `three-pmrem` is the default. It samples a prefiltered three.js CubeUV PMREM directly. This is the fast path and is the recommended default for runtime use, but prefiltered environment lookup is scalar-roughness based and does not preserve full anisotropic specular environment reflections. Direct lighting and the rest of the generated MaterialX shader still run normally.
53
+ - `materialx-prefiltered` uses MaterialX's stock prefiltered latlong environment shader path. It is useful for parity checks and exported MaterialX-style prefiltered maps, but it is still a prefiltered lookup.
54
+ - `materialx-fis` enables MaterialX filtered importance sampling. This path is slower, but it preserves anisotropic specular environment reflections.
55
+
56
+ For anisotropic specular environment reflection checks, opt into `materialx-fis`:
57
+
58
+ ```ts
59
+ import { useNeedleMaterialX } from "@needle-tools/materialx";
60
+
61
+ useNeedleMaterialX(gltfLoader, {
62
+ environmentRadianceMode: "materialx-fis",
63
+ });
64
+ ```
65
+
66
+ The same option is available when creating a raw MaterialX material:
67
+
68
+ ```ts
69
+ import { Experimental_API } from "@needle-tools/materialx";
70
+
71
+ const material = await Experimental_API.createMaterialXMaterial(
72
+ mtlxSource,
73
+ 0,
74
+ undefined,
75
+ { environmentRadianceMode: "materialx-fis" },
76
+ );
77
+ ```
78
+
46
79
  ## WASM
47
80
 
48
81
  ### Default (CDN)
@@ -143,4 +176,3 @@ Materials can also contain the `NEEDLE_materials_mtlx` extension, which referenc
143
176
  [Discord](https://discord.needle.tools) •
144
177
  [Forum](https://forum.needle.tools) •
145
178
  [Youtube](https://www.youtube.com/@needle-tools)
146
-