# Exporting Node Material Shader to be used in ThreeJS

**URL:** <https://forum.babylonjs.com/t/exporting-node-material-shader-to-be-used-in-threejs/25747>\
**Category:** Questions\
**Tags:** material, exporter, nme\
**Created:** [December 3, 2021, 10:42am UTC](https://forum.babylonjs.com/t/exporting-node-material-shader-to-be-used-in-threejs/25747 "2021-12-03T10:42:28Z")\
**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:** [December 3, 2021, 11:11am UTC](https://forum.babylonjs.com/t/exporting-node-material-shader-to-be-used-in-threejs/25747/2 "2021-12-03T11:11:00Z")

</div>

No, a node material is not meant to be exported at the GLSL code level, even for reuse in Babylon.js. See for eg:

> [@Using shaders exported from Node Material Editor](https://forum.babylonjs.com/t/using-shaders-exported-from-node-material-editor/15628/3):
>
> The exported shader code is not really meant to be used directly because it would need a lot of wrapping to be functional. See [#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) for eg. What you should do is either exporting the js code, as you did in [your PG](https://playground.babylonjs.com/#JICX85) or use the NodeMaterial.ParseXXX functions: [https://playground.babylonjs.com/#JICX85#1](https://playground.babylonjs.com/#JICX85#1)

For very simple materials you may be able to use the glsl code directly, but if for eg you add lighting it’s simply impossible, lights relies on existing feature in the Babylon.js framework to work.

---

_[View the full topic](https://forum.babylonjs.com/t/exporting-node-material-shader-to-be-used-in-threejs/25747)._
