# \#node-material

**URL:** https://discourse.threejs.org/tag/node-material/530.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [TSL/Node hierarchy ](https://discourse.threejs.org/t/tsl-node-hierarchy/92044)

<div class="topic-metadata">

**Author:** [@xiaofanghao](https://discourse.threejs.org/u/xiaofanghao)\
**Replies:** 1\
**Last updated:** [June 4, 2026, 7:31am UTC](https://discourse.threejs.org/t/tsl-node-hierarchy/92044 "2026-06-04T07:31:14Z")

</div>

I am currently developing a node editing website similar to the TSL-GRAPH website to learn about TSL and Node knowledge and to practice coding skills. However, I have encountered some issues: How is the node tree, or the…

---

## [TSL Shaders: Improving ergonomics using wgsl "tag template literal" functions](https://discourse.threejs.org/t/tsl-shaders-improving-ergonomics-using-wgsl-tag-template-literal-functions/90010)

<div class="topic-metadata">

**Author:** [@gkjohnson](https://discourse.threejs.org/u/gkjohnson)\
**Replies:** 4\
**Last updated:** [February 25, 2026, 3:12am UTC](https://discourse.threejs.org/t/tsl-shaders-improving-ergonomics-using-wgsl-tag-template-literal-functions/90010 "2026-02-25T03:12:04Z")

</div>

tl;dr: jump to the Tag Template Literal Functions section for a look at a suggested new mechanism for writing TSL-compatible wgsl. I’ve recently taken a first dive into three.js’ new Node Materials and TSL. And admitted…

---

## [Stars Animation with Three.js and TSL](https://discourse.threejs.org/t/stars-animation-with-three-js-and-tsl/89430)

<div class="topic-metadata">

**Author:** [@robotbobby](https://discourse.threejs.org/u/robotbobby)\
**Replies:** 2\
**Last updated:** [January 25, 2026, 2:29pm UTC](https://discourse.threejs.org/t/stars-animation-with-three-js-and-tsl/89430 "2026-01-25T14:29:49Z")

</div>

Classic Star field effect, using fundamental TSL nodes.

---

## [Better var naming for generated WGSL?](https://discourse.threejs.org/t/better-var-naming-for-generated-wgsl/88738)

<div class="topic-metadata">

**Author:** [@trusktr](https://discourse.threejs.org/u/trusktr)\
**Replies:** 2\
**Last updated:** [December 20, 2025, 9:12pm UTC](https://discourse.threejs.org/t/better-var-naming-for-generated-wgsl/88738 "2025-12-20T21:12:03Z")

</div>

I’m trying to debug/learn, and inspecting things such as the output WGSL code from WebGPURenderer, and I see shader code like this, This makes me wonder if there is some way to generate the code with human readable n…

---

## [What do I replace a material's 'normalNode' with to force fragments to be shaded as if they were always pointing world-up (0,1,0)?](https://discourse.threejs.org/t/what-do-i-replace-a-materials-normalnode-with-to-force-fragments-to-be-shaded-as-if-they-were-always-pointing-world-up-0-1-0/86199)

<div class="topic-metadata">

**Author:** [@torrent](https://discourse.threejs.org/u/torrent)\
**Replies:** 4\
**Last updated:** [August 13, 2025, 10:57pm UTC](https://discourse.threejs.org/t/what-do-i-replace-a-materials-normalnode-with-to-force-fragments-to-be-shaded-as-if-they-were-always-pointing-world-up-0-1-0/86199 "2025-08-13T22:57:37Z")

</div>

Let’s say I have a sphere mesh with a MeshLambertNodeMaterial on it. I also have a DirectionalLight shining directly down from above. What do I replace material.normalNode with such that the Lambert shading thinks all …

---

## [TSL: Is a NodeMaterial's default "outputNode" property already "pre-calculated"?](https://discourse.threejs.org/t/tsl-is-a-nodematerials-default-outputnode-property-already-pre-calculated/85667)

<div class="topic-metadata">

**Author:** [@torrent](https://discourse.threejs.org/u/torrent)\
**Replies:** 9\
**Last updated:** [July 31, 2025, 6:54pm UTC](https://discourse.threejs.org/t/tsl-is-a-nodematerials-default-outputnode-property-already-pre-calculated/85667 "2025-07-31T18:54:36Z")

</div>

Using TSL, let’s say I’ve replaced the outputNode property of a MeshLambertNodeMaterial to set the output’s opacity to 0.5, like this: const material = new MeshLambertNodeMaterial(); const originalOutputNode = material…

---

## [Bind pre-existing storage buffer to TSL pipeline?](https://discourse.threejs.org/t/bind-pre-existing-storage-buffer-to-tsl-pipeline/85620)

<div class="topic-metadata">

**Author:** [@jaccola](https://discourse.threejs.org/u/jaccola)\
**Replies:** 0\
**Last updated:** [July 29, 2025, 1:28pm UTC](https://discourse.threejs.org/t/bind-pre-existing-storage-buffer-to-tsl-pipeline/85620 "2025-07-29T13:28:37Z")

</div>

I have an algorithm I am using that is written with “raw” WebGPU WGSL code (i.e. no threejs involvment). The algorithm ultimately sorts some data that is stored in a storage buffer, I create the storage buffer like so: c…

---

## [What does the transmission node use as reflection reference?](https://discourse.threejs.org/t/what-does-the-transmission-node-use-as-reflection-reference/85576)

<div class="topic-metadata">

**Author:** [@Rathalio](https://discourse.threejs.org/u/Rathalio)\
**Replies:** 5\
**Last updated:** [July 29, 2025, 12:25pm UTC](https://discourse.threejs.org/t/what-does-the-transmission-node-use-as-reflection-reference/85576 "2025-07-29T12:25:46Z")

</div>

Hi! I have a node material with some custom vertex node shader. It’s overriding the default skinning and therefore the vertex positions are being controlled by the shader. I currently have an issue with transmission pr…

---

## [Clipping issues with node materials using custom vertexNode](https://discourse.threejs.org/t/clipping-issues-with-node-materials-using-custom-vertexnode/85194)

<div class="topic-metadata">

**Author:** [@Rathalio](https://discourse.threejs.org/u/Rathalio)\
**Replies:** 2\
**Last updated:** [July 15, 2025, 5:17pm UTC](https://discourse.threejs.org/t/clipping-issues-with-node-materials-using-custom-vertexnode/85194 "2025-07-15T17:17:13Z")

</div>

Hi! I recently did setup a vertex shader using material nodes and TSL. Unfortunately I noticed some clipping issues when a mesh with that material shader is moved significantly far from its original position. My guess …

---

## [Loading normal maps in TSL](https://discourse.threejs.org/t/loading-normal-maps-in-tsl/85087)

<div class="topic-metadata">

**Author:** [@Rathalio](https://discourse.threejs.org/u/Rathalio)\
**Replies:** 2\
**Last updated:** [July 11, 2025, 5:35pm UTC](https://discourse.threejs.org/t/loading-normal-maps-in-tsl/85087 "2025-07-11T17:35:14Z")

</div>

Hi! I was updating some details on my node materials and I stepped upon something weird. I’m currently transferring material settings from a regular non-node material to a node material. For pretty much everything else…

---

## [Can't Import NodeMaterials R169; Error: Cannot read properties of null (reading 'assign')](https://discourse.threejs.org/t/cant-import-nodematerials-r169-error-cannot-read-properties-of-null-reading-assign/73054)

<div class="topic-metadata">

**Author:** [@miguelmyers8](https://discourse.threejs.org/u/miguelmyers8)\
**Replies:** 2\
**Last updated:** [July 9, 2025, 8:01am UTC](https://discourse.threejs.org/t/cant-import-nodematerials-r169-error-cannot-read-properties-of-null-reading-assign/73054 "2025-07-09T08:01:29Z")

</div>

I have two very basic Node projects. Project A imports and call a simple function from project B. and renders it with WebGPURenderer. //Project B import \* as THREE from 'three/tsl'; export const createPlane = () =\> { …

---

## [Sharing a NodeMaterial For Multiple Objects with Unique Uniforms](https://discourse.threejs.org/t/sharing-a-nodematerial-for-multiple-objects-with-unique-uniforms/77316)

<div class="topic-metadata">

**Author:** [@michealmyers81](https://discourse.threejs.org/u/michealmyers81)\
**Replies:** 3\
**Last updated:** [January 30, 2025, 4:00pm UTC](https://discourse.threejs.org/t/sharing-a-nodematerial-for-multiple-objects-with-unique-uniforms/77316 "2025-01-30T16:00:58Z")

</div>

I want to know how I can use one shared NodeMaterial for multiple objects, each with different uniforms. From what I’ve gathered on this forum, with the old material system, you could only achieve this using a ShaderMate…

---

## [Nodes - how to pass array of floats to wgslFn?](https://discourse.threejs.org/t/nodes-how-to-pass-array-of-floats-to-wgslfn/61797)

<div class="topic-metadata">

**Author:** [@geolehmann](https://discourse.threejs.org/u/geolehmann)\
**Replies:** 0\
**Last updated:** [February 22, 2024, 10:28am UTC](https://discourse.threejs.org/t/nodes-how-to-pass-array-of-floats-to-wgslfn/61797 "2024-02-22T10:28:55Z")

</div>

Hi everyone, as simple as the title says - how do I pass an array of floats to a wgslFn? Within the WGSL code I can receive the array as array\<\< f32 \>, count\> but I did not found any examples how to pass the array from …

---

## [How to determine if a material has been fully compiled?](https://discourse.threejs.org/t/how-to-determine-if-a-material-has-been-fully-compiled/76056)

<div class="topic-metadata">

**Author:** [@dsu](https://discourse.threejs.org/u/dsu)\
**Replies:** 1\
**Last updated:** [January 7, 2025, 8:26am UTC](https://discourse.threejs.org/t/how-to-determine-if-a-material-has-been-fully-compiled/76056 "2025-01-07T08:26:29Z")

</div>

I am using WebGPURenderer, and I want to know if there is a way to determine whether a material has been compiled. I have a requirement to create an InstancedMesh where the count value might change. For example, if the c…

---

## [How to change texture uniform in NodeMaterial?](https://discourse.threejs.org/t/how-to-change-texture-uniform-in-nodematerial/63359)

<div class="topic-metadata">

**Author:** [@Bob\_Lil](https://discourse.threejs.org/u/Bob_Lil)\
**Replies:** 2\
**Last updated:** [December 29, 2024, 1:27pm UTC](https://discourse.threejs.org/t/how-to-change-texture-uniform-in-nodematerial/63359 "2024-12-29T13:27:07Z")

</div>

@sunag Sir, help plz~~! I have a custom node material like: class CustomMaterial extends MeshStandardNodeMaterial { constructor(parameters = {}) { const {diffuseMap, params} = parameters; super(para…

---

## [How to pass texture parameter to tslFn with setLayout](https://discourse.threejs.org/t/how-to-pass-texture-parameter-to-tslfn-with-setlayout/70035)

<div class="topic-metadata">

**Author:** [@ligaofeng0901](https://discourse.threejs.org/u/ligaofeng0901)\
**Replies:** 5\
**Last updated:** [November 13, 2024, 3:56am UTC](https://discourse.threejs.org/t/how-to-pass-texture-parameter-to-tslfn-with-setlayout/70035 "2024-11-13T03:56:15Z")

</div>

This is my example: const test = tslFn((\[texNode, uv\]) =\> { .... some logic return texNode.uv(transformedUV); }) .setLayout({ name: 'test', type: 'vec4', inputs: \[ { name: 'texNode', …

---

## [Is it possible to mix materials/lighting-models with TSL and nodes?](https://discourse.threejs.org/t/is-it-possible-to-mix-materials-lighting-models-with-tsl-and-nodes/73738)

<div class="topic-metadata">

**Author:** [@akella](https://discourse.threejs.org/u/akella)\
**Replies:** 2\
**Last updated:** [November 7, 2024, 11:08am UTC](https://discourse.threejs.org/t/is-it-possible-to-mix-materials-lighting-models-with-tsl-and-nodes/73738 "2024-11-07T11:08:59Z")

</div>

Hi! More a question about API because i’m new to it. What i wanted: to mix a couple of materials on single surface Like this demo for example Genuary 2022 - Day 7 - Sol LeWitt Wall Drawing How i imagined it might w…

---

## [Utsubo 2024 WebGPU Experiment](https://discourse.threejs.org/t/utsubo-2024-webgpu-experiment/60492)

<div class="topic-metadata">

**Author:** [@Yakuno](https://discourse.threejs.org/u/Yakuno)\
**Replies:** 7\
**Last updated:** [October 18, 2024, 7:36am UTC](https://discourse.threejs.org/t/utsubo-2024-webgpu-experiment/60492 "2024-10-18T07:36:25Z")

</div>

Hey there! I just dove into my first experiment with the new WebGPURenderer, and I’ve gotta tell you, it’s been quite the ride. I’ve been messing around with Three.js Shading Language (TSL) and Node Materials, trying to …

---

## [Nodysseus: a node-based editor for the web with three.js bindings](https://discourse.threejs.org/t/nodysseus-a-node-based-editor-for-the-web-with-three-js-bindings/53483)

<div class="topic-metadata">

**Author:** [@ulysses](https://discourse.threejs.org/u/ulysses)\
**Replies:** 5\
**Last updated:** [September 12, 2024, 4:07pm UTC](https://discourse.threejs.org/t/nodysseus-a-node-based-editor-for-the-web-with-three-js-bindings/53483 "2024-09-12T16:07:35Z")

</div>

Hey everyone, I’d like to introduce you all to Nodysseus (https://nodysseus.io), a node-based editor for the web. It’s got three.js bindings integrated into the editor both for regular three.js and three.js’ exciting ne…

---

## [How to update code of a custom node in node material system?](https://discourse.threejs.org/t/how-to-update-code-of-a-custom-node-in-node-material-system/69507)

<div class="topic-metadata">

**Author:** [@ligaofeng0901](https://discourse.threejs.org/u/ligaofeng0901)\
**Replies:** 0\
**Last updated:** [August 20, 2024, 10:56am UTC](https://discourse.threejs.org/t/how-to-update-code-of-a-custom-node-in-node-material-system/69507 "2024-08-20T10:56:03Z")

</div>

I created a custom node like below， It means Blending some textures to diffuse color, and running at postprocessing. the method .textures can update textures of the node. After size of textures is changed, .setup is supp…

---

## [How to use vertexNode of NodeMaterial](https://discourse.threejs.org/t/how-to-use-vertexnode-of-nodematerial/69299)

<div class="topic-metadata">

**Author:** [@ligaofeng0901](https://discourse.threejs.org/u/ligaofeng0901)\
**Replies:** 13\
**Last updated:** [August 19, 2024, 6:53am UTC](https://discourse.threejs.org/t/how-to-use-vertexnode-of-nodematerial/69299 "2024-08-19T06:53:31Z")

</div>

I set vertexNode like this below, but It always occurs an error. And there are few examples to show how to use it. Can anyone help me please? const sphereGeometry = new THREE.SphereGeometry(1, 32, 32); const material2 =…

---

## [How to hide part of material based on vertex position with the new webgpu node materials?](https://discourse.threejs.org/t/how-to-hide-part-of-material-based-on-vertex-position-with-the-new-webgpu-node-materials/66658)

<div class="topic-metadata">

**Author:** [@Tom\_Schmitz](https://discourse.threejs.org/u/Tom_Schmitz)\
**Replies:** 1\
**Last updated:** [June 12, 2024, 10:58am UTC](https://discourse.threejs.org/t/how-to-hide-part-of-material-based-on-vertex-position-with-the-new-webgpu-node-materials/66658 "2024-06-12T10:58:28Z")

</div>

Hi, I’m quite new to the WebGPU node materials and trying to figure out how to hide part of a material (change opacity) based on the vertex position. Bellow a screenshot of a shader graph (external tool) of what I’m tr…

---

## [What is going on with NodeMaterials? All the examples are gone](https://discourse.threejs.org/t/what-is-going-on-with-nodematerials-all-the-examples-are-gone/66451)

<div class="topic-metadata">

**Author:** [@byDezign](https://discourse.threejs.org/u/byDezign)\
**Replies:** 2\
**Last updated:** [June 5, 2024, 11:11am UTC](https://discourse.threejs.org/t/what-is-going-on-with-nodematerials-all-the-examples-are-gone/66451 "2024-06-05T11:11:05Z")

</div>

I was trying to use the MaterialXLoader and was running into a few errors. Went to look at the examples and nearly all of them have been scrubbed. I can see PR’s related to nodes pushed as recent as today but they are a…

---

## [Node Material for typescript](https://discourse.threejs.org/t/node-material-for-typescript/65404)

<div class="topic-metadata">

**Author:** [@RudyBlack](https://discourse.threejs.org/u/RudyBlack)\
**Replies:** 2\
**Last updated:** [May 12, 2024, 4:05am UTC](https://discourse.threejs.org/t/node-material-for-typescript/65404 "2024-05-12T04:05:16Z")

</div>

It seems that the node material type is not fully supported at the moment. Is there a roadmap or solution for this?

---

## [How to write custom vertex shader using NodeMaterial and WebGPURenderer?](https://discourse.threejs.org/t/how-to-write-custom-vertex-shader-using-nodematerial-and-webgpurenderer/63579)

<div class="topic-metadata">

**Author:** [@dinan](https://discourse.threejs.org/u/dinan)\
**Replies:** 0\
**Last updated:** [April 3, 2024, 5:58am UTC](https://discourse.threejs.org/t/how-to-write-custom-vertex-shader-using-nodematerial-and-webgpurenderer/63579 "2024-04-03T05:58:31Z")

</div>

In case of WebGLRenderer，I can create a highly customized mesh with BufferGeometry and ShaderMaterial. But with WebGPURenderer, it seems that ShaderMaterial is not working and it’s recommended to use NodeMaterial. But I…

---

## [Making NodeMaterials work with envMap](https://discourse.threejs.org/t/making-nodematerials-work-with-envmap/60706)

<div class="topic-metadata">

**Author:** [@phil\_crowther](https://discourse.threejs.org/u/phil_crowther)\
**Replies:** 9\
**Last updated:** [March 31, 2024, 8:19pm UTC](https://discourse.threejs.org/t/making-nodematerials-work-with-envmap/60706 "2024-03-31T20:19:37Z")

</div>

I am trying to convert a MeshStandardMaterial to a MeshStandardNodeMaterial. I have loaded an envMap using THREE.CubeTextureLoader and saved the result as scene.background = envMap. Here is the original material: Mat …

---

## [NodeMaterial on unpkg, slow to load all the dependencies](https://discourse.threejs.org/t/nodematerial-on-unpkg-slow-to-load-all-the-dependencies/63213)

<div class="topic-metadata">

**Author:** [@0b5vr](https://discourse.threejs.org/u/0b5vr)\
**Replies:** 5\
**Last updated:** [March 26, 2024, 9:33am UTC](https://discourse.threejs.org/t/nodematerial-on-unpkg-slow-to-load-all-the-dependencies/63213 "2024-03-26T09:33:55Z")

</div>

I’m using unpkg.com for CDN as the installation doc says. When I do import \* as Nodes from "three/addons/nodes/Nodes.js" for NodeMaterials it takes very long time to download all the referenced js files. Sometimes it t…

---

## [Custom WGSL position node in clip space (WebGPU)](https://discourse.threejs.org/t/custom-wgsl-position-node-in-clip-space-webgpu/59223)

<div class="topic-metadata">

**Author:** [@Berthur](https://discourse.threejs.org/u/Berthur)\
**Replies:** 0\
**Last updated:** [December 14, 2023, 11:25am UTC](https://discourse.threejs.org/t/custom-wgsl-position-node-in-clip-space-webgpu/59223 "2023-12-14T11:25:56Z")

</div>

I’m trying to implement a custom vertex shader in WGSL. I can do the following: const params = { position: Nodes.attribute('position', 'vec3'), }; const myPositionNode = Nodes.wgslFn(\` fn getPosition(position: vec3\<f…

---

## [How do I use \`cond\` and \`switch\` node in NodeMaterial?](https://discourse.threejs.org/t/how-do-i-use-cond-and-switch-node-in-nodematerial/59003)

<div class="topic-metadata">

**Author:** [@Bob\_Lil](https://discourse.threejs.org/u/Bob_Lil)\
**Replies:** 3\
**Last updated:** [December 11, 2023, 3:24am UTC](https://discourse.threejs.org/t/how-do-i-use-cond-and-switch-node-in-nodematerial/59003 "2023-12-11T03:24:29Z")

</div>

I want to rewrite a ShaderMaterial to StandardNodeMaterial, here is the glsl segment code in ShaderMaterial. float gridX = mod(uv.x, size.x + emptySize.x); float gridY = mod(uv.y, size.y + emptySize.y); if (gridX \< size…

---

## [WebGPU NodeMaterial: How do I sample material textures in UVs other than model UV?](https://discourse.threejs.org/t/webgpu-nodematerial-how-do-i-sample-material-textures-in-uvs-other-than-model-uv/57345)

<div class="topic-metadata">

**Author:** [@0b5vr](https://discourse.threejs.org/u/0b5vr)\
**Replies:** 7\
**Last updated:** [November 21, 2023, 3:10am UTC](https://discourse.threejs.org/t/webgpu-nodematerial-how-do-i-sample-material-textures-in-uvs-other-than-model-uv/57345 "2023-11-21T03:10:33Z")

</div>

I’m currently trying to create a custom Material / LightingModel using the NodeMaterial implementation (namely, MToon for three-vrm.) I have bumped into an issue that, when I create MaterialReferenceNode in texture type…

[Next page](https://discourse.threejs.org/tag/node-material/530.md?match_all_tags=true&page=1&tags%5B%5D=node-material)
