-
-
Save ciro-unity/a55d73bcda93ca149cf7fd7e407f8812 to your computer and use it in GitHub Desktop.
//This API to create new nodes has been deprecated in early 2019. | |
//This means that if you are on a more recent version of Shader Graph and Universal Render Pipeline, you should use instead a pre-made node, which acts like a container that allows you to inject custom HLSL code into Shader Graph without the need to create a node from scratch. | |
//Please use the new node, not the C# API described here. | |
// | |
//You can find more details about that node in the Docs: https://docs.unity3d.com/Packages/com.unity.shadergraph@6.7/manual/Custom-Function-Node.html | |
//I also blogged about it here: https://connect.unity.com/p/adding-your-own-hlsl-code-to-shader-graph-the-custom-function-node | |
// | |
//If you are still on a very old version of Lightweight Render Pipeline (you shouldn't!!), you can still see the C# code for this custom node by rolling back to a previous version. |
@earthtojens First off, looking for an answer to your problem I accidently ran into this page which is honestly more hidden that it should be:
Custom node documentation
(may come in handy).
Secondly, I'm assuming you didn't put 'Light' in the name field of the custom function as this would give a similar error.
Just make this a little clearer, if you call your function "Main Light" you'll get this error, where as "MainLight" is perfectly fine. I guess space in the custom function name is not allowed.
Hey everyone, as I reported in the gist itself, the API described here is really obsolete now. Please refer to this blog post for the explanation: https://connect.unity.com/p/adding-your-own-hlsl-code-to-shader-graph-the-custom-function-node
As such, I hid the code. You shouldn't use it if you're in a recent version of Universal Render Pipeline. Please use the Custom Function Node instead: https://docs.unity3d.com/Packages/com.unity.shadergraph@6.7/manual/Custom-Function-Node.html
I can't understand. I recreated the whole graph (and custom nodes), used the latest custom node from @baukeJansen, and nothing works. The problem came from the very start from the normal blend node.
![image](https://user-images.githubusercontent.com/7690603/59550518-09292c80-8f5b-11e9-87e3-25a46e0fd949.png)
No errors, no warnings, most of the previews are broken (except fresnel, of course). I've tested it with both 5.13 and 5.16 LWRP+SG, no difference.
![image](https://user-images.githubusercontent.com/7690603/59550542-47265080-8f5b-11e9-85c6-376f3b7d3b52.png)