# Bug in Node Material Editor?

**URL:** <https://forum.babylonjs.com/t/bug-in-node-material-editor/56587>\
**Category:** Bugs\
**Created:** [February 14, 2025, 7:56pm UTC](https://forum.babylonjs.com/t/bug-in-node-material-editor/56587 "2025-02-14T19:56:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![forux](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/forux/32/36392_2.png) [@forux](https://forum.babylonjs.com/u/forux)\
**Post date:** [February 14, 2025, 7:56pm UTC](https://forum.babylonjs.com/t/bug-in-node-material-editor/56587/1 "2025-02-14T19:56:08Z")

</div>

> **[Babylon.js Node Material Editor](https://nodematerial-editor.babylonjs.com/#GA5Q4F%2356)**
>
> Babylon.js Node material editor - shader-based materials editor for Babylon.js

I am trying to understand why it generates next.  
I have no idea so far, can you please help me?

```auto
20:55:26: Node material build successful
20:55:26: Shader compilation error: FRAGMENT SHADER ERROR: 0:576: 'globalWorldPos' : undeclared identifier ERROR: 0:576: 'assign' : l-value required (can't modify a const) ERROR: 0:576: '=' : dimension mismatch ERROR: 0:576: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float' ERROR: 0:577: 'globalWorldNormal' : undeclared identifier ERROR: 0:577: 'output3' : undeclared identifier ERROR: 0:577: 'xyz' : field selection requires structure, vector, or interface block on left hand side ERROR: 0:577: 'assign' : l-value required (can't modify a const) ERROR: 0:578: 'globalWorldNormal' : undeclared identifier WARNING: 0:578: 'normalize' : operation result is undefined for the values passed in ERROR: 0:578: '=' : dimension mismatch ERROR: 0:578: '=' : cannot convert from 'const highp float' to 'highp 4-component vector of float' ERROR: 0:579: 'globalWorldPos' : undeclared identifier ERROR: 0:579: 'xyz' : field selection requires structure, vector, or interface block on left hand side 
20:55:26: Shader compilation error: FRAGMENT SHADER ERROR: 0:576: 'globalWorldPos' : undeclared identifier ERROR: 0:576: 'assign' : l-value required (can't modify a const) ERROR: 0:576: '=' : dimension mismatch ERROR: 0:576: 'assign' : cannot convert from 'highp 3-component vector of float' to 'const highp float' ERROR: 0:577: 'globalWorldNormal' : undeclared identifier ERROR: 0:577: 'output3' : undeclared identifier ERROR: 0:577: 'xyz' : field selection requires structure, vector, or interface block on left hand side ERROR: 0:577: 'assign' : l-value required (can't modify a const) ERROR: 0:578: 'globalWorldNormal' : undeclared identifier WARNING: 0:578: 'normalize' : operation result is undefined for the values passed in ERROR: 0:578: '=' : dimension mismatch ERROR: 0:578: '=' : cannot convert from 'const highp float' to 'highp 4-component vector of float' ERROR: 0:579: 'globalWorldPos' : undeclared identifier ERROR: 0:579: 'xyz' : field selection requires structure, vector, or interface block on left hand side

```

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 17, 2025, 8:33am UTC](https://forum.babylonjs.com/t/bug-in-node-material-editor/56587/2 "2025-02-17T08:33:20Z")

</div>



---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 17, 2025, 9:20am UTC](https://forum.babylonjs.com/t/bug-in-node-material-editor/56587/3 "2025-02-17T09:20:07Z")

</div>

This PR will fix the problem:

> <https://github.com/BabylonJS/Babylon.js/pull/16190>
>
> See https://forum.babylonjs.com/t/bug-in-node-material-editor/56587
> 
> cc @delta…kosh, because this PR also rollbacks the changes from #15434.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 17, 2025, 9:20am UTC](https://forum.babylonjs.com/t/bug-in-node-material-editor/56587/4 "2025-02-17T09:20:11Z")

</div>


