Unity Products:Amplify Shader Editor/ATan2 and Unity Products:Amplify Shader Editor/Abs: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
ampwiki>Amplify RnD Rick
 
ampwiki>Amplify Borba
No edit summary
 
Line 1: Line 1:
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
== Abs Node ==
The Abs Node provides the absolute value of a scalar or of the individual components of vectors. In practice it means removing any negative sign of a value, leaving only the ''absolute'' value.


== ATan2 Node ==
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/AbsGraphicNode.png">


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/>
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/AbsNode.gif">
'''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 24: Line 11:
! 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="paramA" | A
| id="paramInput" | Input
|Dividend of the division operation. Only visible if the respective input port is not connected.
| Value to be used in the ''Abs'' calculation. 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 38: Line 20:
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type
|-  
|-  
| A
| ''Input''
| Dividend of the division operation.
| Value to be used in the ''Abs'' calculation.
| 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>
|}
|}


----
----
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.
 
----
{| style="width: 100%; horizontal-align: right;"
|
Math Operators - Sign and Absolute
|{{#evt:
service=youtube
|id=https://youtu.be/zK7hqx2kdJg
|alignment=right
}}
|}


[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Category:Nodes]][[Category:Math Operators]]
[[Category:Nodes]][[Category:Math Operators]]

Revision as of 12:24, 5 February 2018

Back to Node List

Abs Node

The Abs Node provides the absolute value of a scalar or of the individual components of vectors. In practice it means removing any negative sign of a value, leaving only the absolute value.

Node Parameter Description Default Value
Input Value to be used in the Abs calculation. Only visible if the respective input port is not connected. 0
Input Port Description Type
Input Value to be used in the Abs calculation. Float [1]



  1. ^ Port automatically adapts to all connection types except Sampler types.

Math Operators - Sign and Absolute

Back to Node List