Unity Products:Amplify Shader Editor/Global Array and Unity Products:Amplify Shader Editor/Gradient Sample: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
ampwiki>Amplify RnD Rick
No edit summary
 
ampwiki>Amplify RnD Rick
No edit summary
 
Line 1: Line 1:
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
== Gradient Sample Node ==


== Global Array Node ==
The Gradient Sample Node samples a color given by a [[Unity_Products:Amplify_Shader_Editor/Gradient|Gradient]] node on a given Time.


The Global Array node creates and accesses a global array. Array's type, size and name can be configured via its [[#paramType|Type]], [[#paramArrayLength|Array Length]] and [[#paramName|Name]] respective options.
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/GradientSampleNode.jpg">
<br/><font size="1">Nodes used:
[[Unity_Products:Amplify_Shader_Editor/Gradient|Gradient]],
[[Unity_Products:Amplify_Shader_Editor/Texture_Coordinates|Texture Coordinates]],
[[Unity_Products:Amplify_Shader_Editor/Gradient_Sample|Gradient Sample]]
</font>


<img class="responsive-img" src="http://wiki.amplify.pt/images/Nodes/GlobalArray.jpg">


{| class="wikitable" style="width: 100%;"
{| class="wikitable" style="width: 100%;"
|-
|-  
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type
|-
|-  
| id="paramMode" | Mode
| Value
| Defines if the current creates the array or reference an already created array over other node.
| Gradient object to be sampled.
* '''Object:''' Create and access a global array with the specified setup
* '''Reference:''' Access a global array created on another node
| Object
| Object
|-  
|-  
|- style="background: #e5e5e5;" |
| Time
| id="paramReference" | Reference
| Point in time to sample gradient.
| Global Array node which creates the global array we want to use.
| <None>
|-
| id="paramName" | Name
| Name of the global array to be created/accessed.
| MyGlobalArray
|-
| id="paramAutoRegisterMode" | Auto-Register
| If toggled on, creates the property and/or global variable even if not connected to an Output node
| Off
|-
| id="paramIsJagged" | Is Jagged
| If toggled on, creates a multi-dimensional array/array of arrays.
| Off
|-
|- style="background: #e5e5e5;" |
| id="paramIndex" | Index
| Position on the array to be accessed. Only visible if the respective input port is not connected.
| 0
|-
|- style="background: #e5e5e5;" |
|id="paramArrayLength" | ArrayLength 
| Length of the array to be created. Only visible if the respective input port is not connected.
| 1
|-
|- style="background: #e5e5e5;" |
| id="paramIndexX" | Index X
| Position on the first index to be accessed, only shown on jagged array. Only visible if the respective input port is not connected.
| 0
|-
|- style="background: #e5e5e5;" |
| id="paramIndexY" | Index Y
| Position on the second index to be accessed, only shown on jagged array. Only visible if the respective input port is not connected.
| 0
|-
|- style="background: #e5e5e5;" |
| id="paramLengthX" | Array Length X
| Length, dimension of the first array to be created, only shown on jagged array. Only visible if the respective input port is not connected.
| 1
|-
|- style="background: #e5e5e5;" |
| id="paramLengthY" | Array Length Y
| Length, dimension of the second array (array of the array) to be created, only shown on jagged array. Only visible if the respective input port is not connected.
| 1
|-
|id="paramType" | Type
| Type of data the array will contain.
*'''Float:''' Float data type
*'''Color:'''  Float4 data type
*'''Vector4:''' Float4 data type
*'''Matrix4x4:''' Float4x4 data type
| Float
| Float
|-
|id="paramRange" | Range Check
| if toggled on, adds additional clamp instruction to prevent out of bounds access to the array.
| False
|}
|}


{| class="wikitable" style="width: 100%;"
{| class="wikitable" style="width: 100%;"
|-  
|-  
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type
! style="width: 10%;" | Output Port !! Description !! style="width: 10%;" | Type
|-  
|-  
| Index
| RGBA
|Position on the array to be accessed.  
| Returns the full RGBA color of the sampled gradient.
| Int
| Float4
|-  
|-  
| Array Length
| R
| Length of the array to be created.
| Returns only the R component of the color value which corresponds to the X component of a Vector4
| Int
| Float
|-  
|-  
| Index X
| G
|Position on the first index to be accessed, only shown on jagged array.
| Returns only the G component of the color value which corresponds to the Y component of a Vector4
| Int
| Float
|-  
|-  
| Index Y
| B
|Position on the second index to be accessed, only shown on jagged array.
| Returns only the B component of the color value which corresponds to the Z component of a Vector4
| Int
| Float
|-  
|-  
| Array Length X
| A
|Length, dimension of the first array to be created, only shown on jagged array.
| Returns only the A component of the color value which corresponds to the W component of a Vector4
| Int
| Float
|-
| Array Length Y
|Length, dimension of the second array (array of the array) to be created, only shown on jagged array.
| Int
|}
|}


[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Category:Nodes]][[Category:Constants And Properties]]
[[Category:Nodes]][[Category:Miscellaneous]]

Revision as of 12:27, 29 July 2019

Gradient Sample Node

The Gradient Sample Node samples a color given by a Gradient node on a given Time.


Nodes used: Gradient, Texture Coordinates, Gradient Sample


Input Port Description Type
Value Gradient object to be sampled. Object
Time Point in time to sample gradient. Float
Output Port Description Type
RGBA Returns the full RGBA color of the sampled gradient. Float4
R Returns only the R component of the color value which corresponds to the X component of a Vector4 Float
G Returns only the G component of the color value which corresponds to the Y component of a Vector4 Float
B Returns only the B component of the color value which corresponds to the Z component of a Vector4 Float
A Returns only the A component of the color value which corresponds to the W component of a Vector4 Float

Back to Node List