Unity Products:Amplify Shader Editor/ATan2 and Unity Products:Amplify Shader Editor/Tutorials/Material and Shader Mode: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
m (1 revision imported)
 
Line 1: Line 1:
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
{{#evt:
service=youtube
|id=https://youtu.be/_xcb8tHhBP4
|alignment=right
}}


== ATan2 Node ==
Shader creation concepts.


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/>
[[Category:Tutorials]]
'''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%;"
|-
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value
|- style="background: #e5e5e5;" |
| 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
|}
 
 
{| class="wikitable" style="width: 100%;"
|-
! 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>
|}
 
----
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.
 
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Category:Nodes]][[Category:Math Operators]]

Latest revision as of 00:06, 2 December 2023

Shader creation concepts.