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

Hey Guys,

I’m a non coder and have just stumbled onto Babylon.js’s NME. I was wondering if the exported code could be used in Three.js and React projects? Or does the exported script need to be modified further?

Thanks for you time!

Regards,
Paddy

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):

Hey! I’ll definitely look into this. Thanks for the help!

Hey Evgeni!
I tested the default node setup for a shader (flat shaded) in a shader preview. I went through the article, but is there a way I can convert the include function into something that can be used for webGL?

All the shader includes can be found in the source code repo here: