# Using exported script from Node material editor for Threejs and WebGL experiences

**URL:** https://forum.babylonjs.com/t/using-exported-script-from-node-material-editor-for-threejs-and-webgl-experiences/19179
**Category:** Questions
**Tags:** material
**Created:** [March 15, 2021, 4:34am UTC](https://forum.babylonjs.com/t/using-exported-script-from-node-material-editor-for-threejs-and-webgl-experiences/19179 "2021-03-15T04:34:25Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [March 15, 2021, 10:20am UTC](https://forum.babylonjs.com/t/using-exported-script-from-node-material-editor-for-threejs-and-webgl-experiences/19179/2 "2021-03-15T10:20:20Z")

</div>

Welcome aboard!

The exported shader code could be used in Three.js in theory but you should definitely need to be able to code, as you will at the very least need to bind the attributes/uniforms with their right values.

See this post on how it can be done in Babylon (which is not straightforward when you want to handle lights):

> [@\#include directives in shader code output from Node Material Editor](https://forum.babylonjs.com/t/include-directives-in-shader-code-output-from-node-material-editor/10730/2):
>
> The shader code generated by the NME can’t be used “as is”, you must at the very least bind the uniform and sampler variables with the right values. In your example, u\_world, u\_viewProjection, u\_Diffusecolor, etc must be bound with a value, else they are empty by default. Even the standard matrices must be, because, for eg, u\_world is not the standard name used by Babylon, it is world instead. All those things (and much others) are done for you by the NodeMaterial class so you don’t have to wor…

---

_[View the full topic](https://forum.babylonjs.com/t/using-exported-script-from-node-material-editor-for-threejs-and-webgl-experiences/19179)._
