# 怎样使用Node Material导出的shader文件

**URL:** https://forum.babylonjs.com/t/node-material-shader/21547
**Category:** Questions
**Tags:** shader
**Created:** [June 10, 2021, 7:14am UTC](https://forum.babylonjs.com/t/node-material-shader/21547 "2021-06-10T07:14:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lang\_l](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lang_l/32/16795_2.png) [@lang\_l](https://forum.babylonjs.com/u/lang_l)
#### Post date: [June 10, 2021, 7:14am UTC](https://forum.babylonjs.com/t/node-material-shader/21547/1 "2021-06-10T07:14:04Z")

</div>

I tried to use the shader file exported by node material, but I copied the exported file to the [https://cyos.babylonjs.com/](https://cyos.babylonjs.com/) It will make a mistake.

 ![3_PTMAUDHBT7DH(NRKR7E](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/b/2/b27f0ca801fe80573b4c67dbe774dbfdf89d0d72.png)

---

<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: [June 10, 2021, 10:41am UTC](https://forum.babylonjs.com/t/node-material-shader/21547/2 "2021-06-10T10:41:24Z")

</div>

This code is not meant to be used “as is” in other tools (even in `ShaderMaterial`). See:

> [@Wave Shader Compilation error](https://forum.babylonjs.com/t/wave-shader-compilation-error/20062/13):
>
> The generated code is not meant to be used in a ShaderMaterial. See this thread for eg: [#include directives in shader code output from Node Material Editor - #2 by Evgeni\_Popov](https://forum.babylonjs.com/t/include-directives-in-shader-code-output-from-node-material-editor/10730/2)

---

<div class="post-metadata">

### Author: ![lang\_l](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lang_l/32/16795_2.png) [@lang\_l](https://forum.babylonjs.com/u/lang_l)
#### Post date: [June 10, 2021, 10:50am UTC](https://forum.babylonjs.com/t/node-material-shader/21547/4 "2021-06-10T10:50:19Z")

</div>

好的，非常感谢您给与的回答。

[For others like me that don’t read chinese - Google translate:] Okay, thank you very much for your answer.
