Unity Products:Amplify Shader Editor/ATan and Unity Products:Amplify Shader Editor/ATan2: Difference between pages
(Difference between pages)
AmplifyWiki (talk | contribs) m (1 revision imported) |
AmplifyWiki (talk | contribs) m (1 revision imported) |
||
Line 1: | Line 1: | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
== | == ATan2 Node == | ||
The ATan2 node outputs the arctangent of the division [[#paramA|A]]'''/'''[[#paramB|B]]. If (B,A) defines a (x,y) vector then using this operator returns the angle in radians it does with the x-axis <br/> | |||
'''NOTE:''' ATan2 between multi-channel data types are done per-channel. If ''A'' and ''B'' have different channel amounts a cast is done to match the one with the most amount of channels. | |||
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/ATan2Node.jpg"> | |||
<br/><font size="1">Nodes used: | |||
[[Unity_Products:Amplify_Shader_Editor/Texture_Coordinates|Texture Coordinates]], | |||
[[Unity_Products:Amplify_Shader_Editor/ATan2|ATan2]], | |||
[[Unity_Products:Amplify_Shader_Editor/Tau|Tau]], | |||
[[Unity_Products:Amplify_Shader_Editor/Divide|Divide]], | |||
[[Unity_Products:Amplify_Shader_Editor/Float|Float]], | |||
[[Unity_Products:Amplify_Shader_Editor/Add|Add]], | |||
[[Unity_Products:Amplify_Shader_Editor/Vector2|Vector2]], | |||
[[Unity_Products:Amplify_Shader_Editor/HSV_to_RGB|HSV to RGB]], | |||
[[Unity_Products:Amplify_Shader_Editor/Length|Length]], | |||
[[Unity_Products:Amplify_Shader_Editor/One_Minus|One Minus]] | |||
</font> | |||
{| class="wikitable" style="width: 100%;" | {| class="wikitable" style="width: 100%;" | ||
Line 15: | Line 24: | ||
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value | ! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value | ||
|- style="background: #e5e5e5;" | | |- style="background: #e5e5e5;" | | ||
| id=" | | id="paramA" | A | ||
| | |Dividend of the division operation. Only visible if the respective input port is not connected. | ||
| 0 | |||
|- style="background: #e5e5e5;" | | |||
| id="paramB" | B | |||
| Divisor of the division operation. Only visible if the respective input port is not connected. | |||
| 0 | | 0 | ||
|} | |} | ||
{| class="wikitable" style="width: 100%;" | {| class="wikitable" style="width: 100%;" | ||
Line 24: | Line 38: | ||
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type | ! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type | ||
|- | |- | ||
| | | A | ||
| | | Dividend of the division operation. | ||
| Float <sup id="ref1">[[#anchor|[1]]]</sup> | |||
|- | |||
| B | |||
| Divisor of the division operation. The outputted result will have its sign given by this parameter. | |||
| Float <sup id="ref1">[[#anchor|[1]]]</sup> | | Float <sup id="ref1">[[#anchor|[1]]]</sup> | ||
|} | |} | ||
---- | ---- | ||
Line 34: | Line 51: | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
[[Category:Nodes]][[Category: | [[Category:Nodes]][[Category:Math Operators]] |
Latest revision as of 00:06, 2 December 2023
ATan2 Node
The ATan2 node outputs the arctangent of the division A/B. If (B,A) defines a (x,y) vector then using this operator returns the angle in radians it does with the x-axis
NOTE: ATan2 between multi-channel data types are done per-channel. If A and B have different channel amounts a cast is done to match the one with the most amount of channels.
Nodes used:
Texture Coordinates,
ATan2,
Tau,
Divide,
Float,
Add,
Vector2,
HSV to RGB,
Length,
One Minus
Node Parameter | Description | Default Value |
---|---|---|
A | Dividend of the division operation. Only visible if the respective input port is not connected. | 0 |
B | Divisor of the division operation. Only visible if the respective input port is not connected. | 0 |
Input Port | Description | Type |
---|---|---|
A | Dividend of the division operation. | Float [1] |
B | Divisor of the division operation. The outputted result will have its sign given by this parameter. | Float [1] |