Clipping plane with NodeMaterial in three.js

Greetings ! I was working on a project and was using the X-Ray NodeMaterial that was used in the Node-Based Material demo here 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), 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!


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 example but couldn’t get it to work.