ShaderGraph differences between Unity and Three JS

Hi,

I’m working on gradient, I tried to make Y gradient from three js with vertex color (It seems to not work).
And with shadergraph, but I don’t see any gradient after export.

Do you have an idea ?




Original Post on Discord

by user 224464722878005248

Hey, is that shader marked with the ExportShader label?

Looks like it may be not and all that’s exported is “white unlit”.
Please select the shader and add the label in the bottom right corner of the inspector like this:
image.png

Oh… again… There is so much things to set up that I forgot in each time something
Thanks to you !

by user 224464722878005248

by user 224464722878005248

Don’t know why, it’s black now

by user 224464722878005248

I thought only unlit shader graphs export?

by user 103054507105067008

Ah yes, please switch it to Unlit - Rob’s right that currently we don’t support Lit custom shaders

Hey,Will lit shader be supported in the near future?

by user 417248803431776267

There are a couple of research areas we want to look into to make it viable - e.g. translating ShaderGraph to NodeGraphs and/or MaterialX graphs and use those in three.js.

No ETA yet though

Sounds great, we’ll see!

by user 417248803431776267

If I want to make a material like car paint to export to threejs, shadergraph doesn’t support Lit at the moment, do I have other options?

by user 417248803431776267

Yes, you can make a matching material on the three.js side - e.g. with a NodeGraphMaterial or a custom shader, and a component that sets it up
We’re using this for things like diamond rendering, shadow catchers and so on, you can look at the ShadowCatcher sample scene for an example

ok

by user 417248803431776267

Now, what is a suitable shader node editor for threejs?

by user 417248803431776267

NodeGraphMaterial

by user 417248803431776267