# Clipping plane with NodeMaterial in three.js

**URL:** <https://discourse.threejs.org/t/clipping-plane-with-nodematerial-in-three-js/16495>\
**Category:** Questions\
**Tags:** node-material, clipping, shaders\
**Created:** [June 23, 2020, 11:58am UTC](https://discourse.threejs.org/t/clipping-plane-with-nodematerial-in-three-js/16495 "2020-06-23T11:58:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![inf0](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/inf0/32/11838_2.png) [@inf0](https://discourse.threejs.org/u/inf0)\
**Post date:** [June 23, 2020, 11:58am UTC](https://discourse.threejs.org/t/clipping-plane-with-nodematerial-in-three-js/16495/1 "2020-06-23T11:58:35Z")

</div>

Greetings ! I was working on a project and was using the X-Ray NodeMaterial that was used in the Node-Based Material demo here [https://threejs.org/examples/?q=node#webgl\_loader\_nodes](https://threejs.org/examples/?q=node#webgl_loader_nodes). My problem is that i need a clipping plane to work with this material but soon found out that because NodeMaterial is part material part shader, i would need to include the ShaderChunk, like you would in a normal shader (like in this post [Clipping planes on ShaderMaterial](https://discourse.threejs.org/t/clipping-planes-on-shadermaterial/10155)), to make the clipping plane work, and that setting `clipping=true;` wasn’t enough. My problem is that i don’t know how to add includes to a NodeMaterials. If anyone knows if it can be done, or if anyone knows of a way to seperate a NodeMaterial into it’s components (material, vertexShader, fragmentShader), also i was curious even if i add includes to the NodeMaterial will it actually even work ? Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 23, 2020, 12:48pm UTC](https://discourse.threejs.org/t/clipping-plane-with-nodematerial-in-three-js/16495/2 "2020-06-23T12:48:32Z")

</div>

/cc

> <https://stackoverflow.com/questions/62534297/clipping-plane-with-nodematerial-in-three-js>

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 23, 2020, 8:24pm UTC](https://discourse.threejs.org/t/clipping-plane-with-nodematerial-in-three-js/16495/3 "2020-06-23T20:24:27Z")

</div>

It seems that clipping planes (even global ones) do not yet work with node material. I’ve tried to use `PhongNodeMaterial` in the official [clipping planes](https://threejs.org/examples/webgl_clipping) example but couldn’t get it to work.
