Reflected function hints reference
Use hints to further customize the behavior and appearance, in Shader Graph, of a node generated by reflection from an HLSL function.
To know how to add the following hints to the HLSL function, refer to Further customize the reflected node.
Function hints
Use function hints (funchints) to customize the behavior and appearance of the Reflected Function node as a whole.
| Hint | Value / type | Description |
|---|---|---|
sg:DisplayName |
String | Specifies a custom display name for the node. If you don't use this hint, Unity uses a formatted version of the HLSL function name. |
sg:DynamicPrecision |
N/A | Enables the use of dynamic precision for all supported ports of the node. |
sg:ProviderKey |
String | Specifies a stable identifier for the reflected function. This hint is mandatory. It allows you to reference the function across any changes to the qualified signature. |
sg:ReturnDisplayName |
String | Specifies a custom display name for the node's output port. The default output port display name is Out. |
sg:SearchCategory |
Forward slash separated list of strings | Specifies a category path to use in the Create node menu. If you don't use this hint, Unity uses the namespace if present, otherwise the path to the source file. |
sg:SearchName |
String | Specifies a node name to use in the Create Node menu to differentiate between overloads that might have the same display name. |
sg:SearchTerms |
Comma-separated list of strings | Specifies synonyms for the node name to provide a wider range of matches when a user searches for the node in the Create Node menu. |
Parameter hints
Use parameter hints (paramhints) to customize the behavior and appearance of any input port or parameter of the Reflected Function node.
| Hint | Value / type | Description |
|---|---|---|
sg:Color |
N/A | Renders the input as a color picker. |
sg:CustomBinding |
String | Specifies a custom UI binding label for the port. |
sg:Default |
String | Specifies a default value for the parameter. The string depends on the parameter type, commonly a list of comma-separated floats, referable default tokens such as UV1, or 0-based dropdown indices. |
sg:DisplayName |
String | Specifies a custom display name for the port. If you don't use this hint, Unity uses a formatted version of the HLSL parameter name. |
sg:Dropdown |
Comma separated list of strings | Manages the input as a dropdown with at least one option and specifies the option labels. The parameter type must be int, uint, float, or half. The dropdown value is the index of the entry in the list. |
sg:DynamicVector |
N/A | Enables the use of dynamic dimension (for example, scalar, vector2, vector3, vector4) for a scalar or vector parameter. |
sg:External |
String | Specifies a namespace prefix for unknown types. The result must be a valid HLSL formatted qualified namespace: Namespace::TypeName. |
sg:Linkage |
String | For a bool input only, links the UI state to another parameter on the same function. Specify the name of the other parameter to link to. If the other parameter's port is connected, this input state is true, otherwise false. Setting linkage forces the port to be treated as local internally. |
sg:Literal |
N/A | Marks the scalar port as a literal control (float/half/int/uint only). |
sg:Local |
N/A | Marks the parameter as local and hides it in the graph UI. Use this hint only if you need to have a local variable that is also Dynamic or has Precision. You should also preferably use it with out parameters to prevent unneeded initialization. |
sg:Range |
float, float | Renders the input as a slider and sets a range with minimum and maximum values. The range is not enforced in the shader code. You should expect to clamp the input. |
sg:Referable |
String | Binds the input to a built-in referable. Specify one of the following:
sg:Referable mention. For example, you can use <UV /> instead of <sg:Referable>UV</sg:Referable>. |
sg:Static |
N/A | Forces the parameter to be static and hides the port in the graph UI. Valid on scalar float/half/int/uint/bool, or on float3/float4/half3/half4 only if sg:Color is also present. |