---
title: "Needle MaterialX Changelog"
---

# Needle MaterialX Changelog

[`@needle-tools/materialx`](https://www.npmjs.com/package/@needle-tools/materialx) — Latest: **1.6.0**

## 1.6.0 – 2026-04-01

### Added
- UV coordinate convention handling via `hwTexcoordVerticalFlip` — correctly converts between glTF and OpenGL UV conventions at the shader level
- Material-level ambient occlusion for `gltf_pbr` — modulates indirect lighting per the glTF specification
- Visual graph editor for interactive MaterialX authoring

### Changed
- WASM rebuilt (MaterialX 1.39.4, Emscripten 3.1.74)

## 1.5.1 – 2026-03-22

### Fixed
- UV patching: always wrap vec3 targets regardless of source UV declaration type
- Vertex color: wrap vec3→vec4 for color attributes (Three.js provides vec3)
- Shader test page uses proper environment/lighting matching other test pages

### Added
- Playwright e2e tests validating 111+ MaterialX materials for shader compilation

## 1.5.0 – 2026-03-20

### Added
- Vertex displacement support (GLSL and ESSL/WebGL 2)
- Normal recomputation via screen-space derivatives (dFdx/dFdy) for displaced surfaces
- Procedural noise displacement (fractal3d, position, math nodes)
- Texture-based displacement (image node sampling in vertex shader)
- Displacement animation support via Three.js PropertyBinding
- Three.js shadow support for lit MaterialX shaders (directional, spot, point)
- Alpha mode detection via `getAlphaMode` for mask/blend transparency

### Fixed
- Unlit shaders no longer emit shadow uniforms that cause compilation errors
- UV vec2/vec3 patching for displacement vertex shaders
- Skip MaterialX shader closure types (surfaceshader, displacementshader, etc.) in uniform handling

### Changed
- WASM rebuilt with displacement support (MaterialX 1.39.4, Emscripten 3.1.74)
- Environment map intensity now combines per-material and scene intensity

## 1.4.6 – 2026-03-17
- Fix: Compatibility with older Rollup/Vite 4 by replacing `import ... with` syntax

## 1.4.5 – 2026-03-17
- Fix: Improved error log formatting with package version

## 1.4.4 – 2026-03-17
- Fix: Minor type fixes and improved debug logging

## 1.4.3 – 2026-02-20
- Add: `globalThis.NEEDLE_MATERIALX_LOCATION` to override WASM location. Use `"package"` for package-local files, or a custom path for self-hosted/CDN.

## 1.4.2 – 2026-02-10
- Fix: Improve error handling when MaterialX renderable element is not found

## 1.4.1 – 2026-02-10
- Change: Use CDN as default WASM source

## 1.4.0 – 2026-02-10
- Change: Load WASM binaries from Needle CDN by default instead of bundling locally

## 1.3.4 – 2026-02-09
- Fix: Matrix update for AR sessions

## 1.3.3 – 2026-02-09
- Add: Support for loading `.mtlx` files by index
- Fix: Type fixes in loader

## 1.3.2 - 2025-08-12
- Fix: Error when MaterialX extension is not present

## 1.3.1 - 2025-08-12
- Docs: README improvements

## 1.3.0 - 2025-08-12
- Change: Refactor extension to use a documents array instead of a single document, backwards compatibility is maintained

## 1.2.2 - 2025-07-24
- Add: `preloadWasm` function with support to wait for network idle. This is automatically done for Needle Engine projects.

## 1.2.1 - 2025-07-23
- Fix: Error caused by scene.environment being null

## 1.2.0 - 2025-07-23
- Add: Support to load raw MaterialX materials (from mtlx as XML)
- Fix: Warn if tangents are missing
- Fix: Improve unsupported light handling
- Change: Refactor library to js + jsdoc

## 1.1.0 - 2025-07-15
- Add: `useNeedleMaterialX` hooks for vanilla three.js and Needle Engine

## 1.0.6 - 2025-07-15
- Fix: Texture/environment sampling on some Android devices

## 1.0.3 - 2025-07-10
- Fix: Version bump for npm publish

## 1.0.2 - 2025-07-10
- Add: Material extension `doubleSided` support
- Fix: Improved lighting support
- Fix: Texture loading and glTF texture index resolution

## 1.0.1 - 2025-07-08
- Initial release