Hello,
I'm trying to create a post processing shader, for which I have created several Amplify Shader Functions and using them as nodes in my shader. I was wondering if it's possible to use/reference these in the code box or as input/output of a Custom Expression node. Or maybe I'm looking in the wrong direction, any suggestions are welcome =]
Greets,
n2k
Using Function Nodes inside Custom Expression code box?
Using Function Nodes inside Custom Expression code box?
Last edited by n2k on Thu Sep 27, 2018 11:31 am, edited 1 time in total.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Using Function Nodes inside Custom Expression code box?
Hello, thank you for getting in touch and for your support!
You're free to use use a shader function's output data as an input on a Custom Expression node and reference it in the custom code as the input port's name.
Let me know if this helps, if not, please share some additional info and a screenshot of what you've built so far so that we may best help you out, thanks!
You're free to use use a shader function's output data as an input on a Custom Expression node and reference it in the custom code as the input port's name.
Let me know if this helps, if not, please share some additional info and a screenshot of what you've built so far so that we may best help you out, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Using Function Nodes inside Custom Expression code box?
EDIT:
I think I found a way without using Function Nodes inside the custom expression.
If something changes I'll update this topic =]
Thanks for your response!
----
Sorry I didn't explain properly, it's more complicated.
The Function Nodes need inputs from certain values that only exist inside the custom expression, as they are in a for loop.
I think I found a way without using Function Nodes inside the custom expression.
If something changes I'll update this topic =]
Thanks for your response!
----
Sorry I didn't explain properly, it's more complicated.
The Function Nodes need inputs from certain values that only exist inside the custom expression, as they are in a for loop.
Last edited by n2k on Thu Sep 27, 2018 11:32 am, edited 1 time in total.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Using Function Nodes inside Custom Expression code box?
No problem, thank you for elaborating!
The only way to access values that are contained within a custom expression node is through the node's outputs.
It's possible to have several outputs in your Custom Expression node through using the Qualifier parameter of the added Inputs. Please refer to the image below:

We do have a visual issue with the ports and names not showing correctly on the node itself, but they're working as expected. By setting the Qualifier to Out, the new output port continues to stay as an input port, but any values connected to that will be ignored. Also, the parameter name that you set for the Out port might not be correctly displayed on the node, which should also be ignored as it will be working internally.
Please let me know if this helps, I'll be happy to elaborate!
The only way to access values that are contained within a custom expression node is through the node's outputs.
It's possible to have several outputs in your Custom Expression node through using the Qualifier parameter of the added Inputs. Please refer to the image below:

We do have a visual issue with the ports and names not showing correctly on the node itself, but they're working as expected. By setting the Qualifier to Out, the new output port continues to stay as an input port, but any values connected to that will be ignored. Also, the parameter name that you set for the Out port might not be correctly displayed on the node, which should also be ignored as it will be working internally.
Please let me know if this helps, I'll be happy to elaborate!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!