@needle-tools/materialx 1.2.1-next.343c31f → 1.2.1-next.f90216c
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 +3 -0
- package/package.json +1 -1
- package/src/materialx.material.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@ 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.2.1] - 2025-07-23
|
|
8
|
+
- Fix: error caused by scene.environment being null
|
|
9
|
+
|
|
7
10
|
## [1.2.0] - 2025-07-23
|
|
8
11
|
- Add: Support to load raw MaterialX materials (from mtlx as XML)
|
|
9
12
|
- Fix: Warn if tangents are missing
|
package/package.json
CHANGED
|
@@ -91,6 +91,7 @@ export class MaterialXMaterial extends ShaderMaterial {
|
|
|
91
91
|
// Patch fragmentShader
|
|
92
92
|
const precision = init.parameters?.precision || "highp";
|
|
93
93
|
vertexShader = vertexShader.replace(/precision mediump float;/g, `precision ${precision} float;`);
|
|
94
|
+
vertexShader = vertexShader.replace(/#define M_FLOAT_EPS 1e-8/g, precision === "highp" ? `#define M_FLOAT_EPS 1e-8` : `#define M_FLOAT_EPS 1e-3`);
|
|
94
95
|
fragmentShader = fragmentShader.replace(/precision mediump float;/g, `precision ${precision} float;`);
|
|
95
96
|
fragmentShader = fragmentShader.replace(/#define M_FLOAT_EPS 1e-8/g, precision === "highp" ? `#define M_FLOAT_EPS 1e-8` : `#define M_FLOAT_EPS 1e-3`);
|
|
96
97
|
|