# Custom Function Node Use the Custom Function Node to inject your own custom HLSL code in Shader Graphs to do some fine-grained optimization, for example. You can either write small functions directly into graphs by using the string mode, or reference external HLSL files. Use the [Custom Port Menu](Custom-Port-Menu.md) to define your own input and output ports on the node itself.  | Property | Description | |:----------|:------------| | **Inputs** | Define the node's input ports. The names you enter here define the names for the input values you use in the code. | | **Outputs** | Define the node's output ports. The names you enter here define the names for the output values you use in the code. | | **Type** | Select the way to reference the custom function in the node. The options are: