Unity Products:Amplify Shader Editor/Nodes

From Amplify Creations Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Product Page - Included Shaders - Manual - Shader Functions - Tutorials - API - Shader Templates - Scriptable Rendering Pipeline - Nodes - Community Nodes

Available Node Categories

Camera And Screen
Constants And Properties
Functions
Image Effects
Light
Logical Operators
Math Operators
Matrix Operators
Matrix Transform
Miscellaneous
Object Transform
Surface Data
Textures
Time
Trigonometry Operators
UV Coordinates
Vector Operators
Vertex Data

Camera And Screen

Camera Depth Fade

Outputs a 0 - 1 gradient representing the distance between the surface of this object and camera near plane

Learn More
Clip Planes

Camera World Clip Planes

Learn More
Compute Grab Screen Pos

Computes texture coordinate for doing a screenspace-mapped texture sample. Input is clip space position

Learn More
Compute Screen Pos

Computes texture coordinate for doing a screenspace-mapped texture sample. Input is clip space position

Learn More
Dither

Generates a dithering pattern

Learn More
Grab Screen Color

Grabed pixel color value from screen

Learn More
Grab Screen Position

Screen position correctly transformed to be used with Grab Screen Color

Learn More
Ortho Params

Orthographic Parameters

Learn More
Projection Matrices

Camera's Projection/Inverse Projection matrix

Learn More
Projection Params

Projection Near/Far parameters

Learn More
Screen Depth

Given a screen postion returns the depth of the scene to the object as seen by the camera

Learn More
Screen Params

Camera's Render Target size parameters

Learn More
Screen Position

Screen space position, you can either get the Screen position as is or Normalize it to have it at the [0,1] range

Learn More
View Dir

View direction vector, you can select between World space or Tangent space

Learn More
World Space Camera Pos

World Space Camera position

Learn More
Z-Buffer Params

Linearized Z buffer values

Learn More

Back to Top


Constants And Properties

Color

Color property

Learn More
Float

Float property

Learn More
Global Array

The node returns a value from a global array, which you can configure by entering the name of the array in the node's settings.

( originally by Johann van Berkel ) Learn More
Int

Int property

Learn More
Matrix3X3

Matrix3X3 property

Learn More
Matrix4X4

Matrix4X4 property

Learn More
PI

PI constant : 3.14159265359

Learn More
Tau

Tau constant (2*PI): 6.28318530718

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Template Parameter

Select and use one of the pre-existing properties given by the template

Learn More
Vector2

Vector2 property

Learn More
Vector3

Vector3 property

Learn More
Vector4

Vector4 property

Learn More

Back to Top


Functions

Function Input

Function Input adds an input port to the shader function

Learn More
Function Output

Function Output adds an output port to the shader function, it's port type is determined automatically.

Learn More
Function Subtitle

Adds a subtitle to its shader function.

Learn More
Function Switch

Function Switch allows switching options at compile time for shader function.

Learn More
Switch by Pipeline

Executes branch according to current pipeline.

Learn More

Back to Top


Image Effects

Blend Operations

Common layer blending modes

Learn More
Desaturate

Generic desaturation operation

Learn More
Gamma To Linear

Converts color from gamma space to linear space

Learn More
Grayscale

Convert image colors to grayscale

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
HSV to RGB

Converts from HSV to RGB color space

Learn More
Linear To Gamma

Converts color from linear space to gamma space

Learn More
Posterize

Converts a continuous gradation of tones to multiple regions of fewer tones

Learn More
RGB to HSV

Converts from RGB to HSV color space

Learn More
Simple Contrast

Simple contrast matrix multiplication

Learn More

Back to Top


Light

Fog And Ambient Colors

Fog and Ambient colors

Learn More
Fog Params

Parameters for fog calculation

Learn More
Indirect Specular Light

Indirect Specular Light

Learn More
Light Attenuation

Contains light attenuation for all types of light

Learn More
Light Color

Light Color, RGB value already contains light intensity while A only contains light intensity

Learn More
Object Space Light Dir

Computes object space light direction (not normalized)

Learn More
Shade Vertex Lights

Computes illumination from four per-vertex lights and ambient, given object space position & normal

Learn More
Standard Surface Light

Provides a way to create a standard surface light model in custom lighting mode

Learn More
World Space Light Dir

Computes normalized world space light direction

Learn More

Back to Top


Logical Operators

Compare (A < B)

Check if A is lower than B. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Compare (A = B)

Check if A is equal to B. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Compare (A > B)

Check if A is greater than B. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Compare (A ≠ B)

Check if A is not equal to B. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Compare (A ≤ B)

Check if A is lower than or equal to B. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Compare (A ≥ B)

Check if A is greater than or equal to B. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Compare With Range

Check if A is in the range between Range Min and Range Max. If true return value of True else return value of False

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Debug Switch

Hard Switch between any of its input ports

Learn More
If

Conditional comparison between A with B.

Learn More
If [Community]

Compare A with B. If A is greater than B output the value of A > B port. If A is equal to B output the value of A == B port. If A is lower than B output the value of A < B port. Equal Threshold parameter will be used to check A == B adding and subtracting this value to A.

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Static Switch

Creates a shader keyword toggle

Learn More
Toggle Switch

Relays, in compile time, the correct input port according to current analyzed sub-shader/pass

Learn More
Toggle Switch

Switch between any of its input ports

Learn More

Back to Top


Math Operators

Abs

Absolute value of scalars and vectors

Learn More
Add

Addition of two or more values ( A + B + .. )

Learn More
Ceil

Smallest integer not less than a scalar or each vector component

Learn More
Clamp

Value clamped to the range [min,max]

Learn More
DDX

Approximate partial derivative with respect to window-space X

Learn More
DDY

Approximate partial derivative with respect to window-space Y

Learn More
Divide

Division of two values ( A / B )

Learn More
Exp

Base-e exponential of scalars and vectors

Learn More
Exp2

Base-2 exponential of scalars and vectors

Learn More
Floor

Largest integer not greater than a scalar or each vector component

Learn More
Fmod

Floating point remainder of x/y with the same sign as x

Learn More
Fract

Fractional portion of a scalar or each vector component

Learn More
FWidth

Sum of approximate window-space partial derivatives magnitudes

Learn More
Lerp

Linear interpolation of two scalars or vectors based on a weight

Learn More
Log

Natural logarithm of scalars and vectors

Learn More
Log10

Base-10 logarithm of scalars and vectors

Learn More
Log2

Base-2 logarithm of scalars and vectors

Learn More
Max

Maximum of two scalars or each respective component of two vectors

Learn More
Min

Minimum of two scalars or each respective component of two vectors

Learn More
Multiply

Multiplication of two or more values ( A * B * .. ) It also handles Matrices multiplication

Learn More
Negate

Negate or invert an input value

Learn More
One Minus

1 - input value

Learn More
Power

Base to the Exp-th power of scalars and vectors

Learn More
Remainder

Remainder between two variables

Learn More
Remap

Remap value from old min - max range to new min - max range

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Round

Rounded value of scalars or vectors

Learn More
Rsqrt

Reciprocal square root of scalars and vectors

Learn More
Saturate

Saturate clamps the input values into the [0,1] range

Learn More
Scale

Scales input value by a float factor

Learn More
Scale And Offset

Scales and offsets an input value ( ( Value * Scale ) + Offset )

Learn More
Sign

Sign of scalar or each vector component

Learn More
Simplified Fmod

Floating point remainder of x/y

Learn More
Smoothstep

Returns a smooth Hermite interpolation between 0 and 1, if input is in the range [min, max].

Learn More
Sqrt

Square root of scalars and vectors

Learn More
Step

Step function returning either zero or one

Learn More
Subtract

Subtraction of two values ( A - B )

Learn More
Trunc

Largest integer not greater than a scalar or each vector component

Learn More

Back to Top


Matrix Operators

Determinant

Scalar determinant of a square matrix

Learn More
Inverse

Inverse matrix of a matrix

Learn More
Matrix From Vectors

Matrix From Vectors

Learn More
Position From Transform

Gets the position vector from a transformation matrix

Learn More
Transpose

Transpose matrix of a matrix

Learn More
Vector From Matrix

Retrieve vector data from a matrix

Learn More

Back to Top


Matrix Transform

Camera To World Matrix

Current camera to world matrix

Learn More
Common Transform Matrices

All Transformation types

Learn More
Model Matrix

Current model matrix

Learn More
Model View Matrix

Current model * view matrix

Learn More
Model View Projection Matrix

Current model * view * projection matrix

Learn More
Object To World Matrix

Current model matrix

Learn More
Projection Matrix

Current projection matrix

Learn More
Projector Clip Matrix

Current Projector Clip matrix, to be used when working with Unity projector

Learn More
Transpose Model View Matrix

Transpose of model * view matrix

Learn More
View Matrix

Current view matrix

Learn More
Inverse View Matrix

Current inverse view matrix

Learn More
View Projection Matrix

Current view * projection matrix.

Learn More
World To Camera Matrix

Inverse of current camera to world matrix

Learn More
World To Object Matrix

Inverse of current world matrix

Learn More
World To Tangent Matrix

World to tangent transform matrix

Learn More

Back to Top


Miscellaneous

Billboard

Calculates new Vertex positions and normals to achieve a billboard effect.

Learn More
Color Space Double

Color Space Double

Learn More
Custom Expression

Creates a custom expression or function if return is detected in the written code.

Learn More
Decode Depth Normal

Decodes both Depth and Normal from a previously encoded pixel value

Learn More
Decode Float RG

Decodes a previously-encoded RG float

Learn More
Decode Float RGBA

Decodes RGBA color into a float

Learn More
Decode Lightmap

Decodes color from Unity lightmap (RGBM or dLDR depending on platform)

Learn More
Decode View Normal Stereo

Decodes view space normal from enc4.xy

Learn More
Diffuse And Specular From Metallic

Gets Diffuse and Specular values from Metallic

Learn More
Distance-based Tessellation

Calculates tessellation based on distance from camera

Learn More
Edge Length Tessellation

Tessellation level computed based on triangle edge length on the screen

Learn More
Edge Length Tessellation With Cull

Tessellation level computed based on triangle edge length on the screen with patch frustum culling

Learn More
Encode Float RG

Encodes [0..1] range float into a float2

Learn More
Encode Float RGBA

Encodes [0..1] range float into RGBA color, for storage in low precision render target

Learn More
Encode View Normal Stereo

Encodes view space normal into two numbers in [0..1] range

Learn More
Get Local Var

Use a registered local variable

Learn More
Layered Blend

Mix all channels through interpolation factors

Learn More
LOD Fade

LODFadeNode

Learn More
Noise Generator

Collection of procedural noise generators

Learn More
Register Local Var

Forces a local variable to be written with the given name. Can then be fetched at any place with a Get Local Var node.

Learn More
Summed Blend

Mix all channels through weighted sum

Learn More
Switch by Face

Switch which automaticaly uses a Face variable to select which input to use

Learn More
Vertex To Fragment

Pass vertex data to the pixel shader

( originally by Jason Booth - http://u3d.as/DND ) Learn More
Weighted Blend

Mix all channels through weighted average sum

Learn More

Back to Top


Object Transform

Object Space View Dir

Object space direction (not normalized) from given object space vertex position towards the camera

Learn More
Object To Clip Pos

Transforms a point from object space to the camera’s clip space in homogeneous coordinates

Learn More
Object To View Pos

Transforms a point from object space to view space

Learn More
Object To World

Transforms input to World Space

Learn More
World Space View Dir

World space direction (not normalized) from given object space vertex position towards the camera

Learn More
World To Object

Transforms input to Object Space

Learn More
World Transform Params

World Transform Params contains information about the transform, W is usually 1.0, or -1.0 for odd-negative scale transforms

Learn More

Back to Top


Surface Data

Depth Fade

Outputs a 0 - 1 gradient representing the distance between the surface of this object and geometry behind

Learn More
Fresnel

Simple Fresnel effect

Learn More
Surface Depth

Returns the surface view depth

Learn More
Template Fragment Data

Select and use available interpolated fragment data from the template

Learn More
World Bitangent

Per pixel world bitangent vector

( originally by kebrus ) Learn More
World Normal

Per pixel world normal vector, accepts a Normal vector in tangent space (ie: normalmap)

Learn More
World Position

World space position

Learn More
World Reflection

Per pixel world reflection vector, accepts a Normal vector in tangent space (ie: normalmap)

Learn More
World Tangent

Per pixel world tangent vector

( originally by kebrus ) Learn More

Back to Top


Textures

Blend Normals

Blend Normals

Learn More
HeightMap Texture Blend

Advanced Texture Blending by using heightMap and splatMask, usefull for texture layering

( originally by Rea ) Learn More
Substance Sample

Samples a procedural material

Learn More
Texel Size

Texel Size for a given texture object

Learn More
Texture Array

Texture Array fetches a texture from a texture2DArray asset file given a index value

Learn More
Texture Object

Represents a Texture Asset. Can be used in samplers Tex inputs or shader function inputs to reuse the same texture multiple times.

Learn More
Texture Sample

Samples a chosen texture and returns its color values, Texture and UVs can be overriden and you can select different mip modes and levels. It can also unpack and scale textures marked as normalmaps.

Learn More
Triplanar Sample

Triplanar Mapping

Learn More
Unpack Scale Normal

Applies UnpackNormal/UnpackScaleNormal function

Learn More
Virtual Texture Object

Represents a Virtual Texture Asset

Learn More

Back to Top


Time

Cos Time

Cosine of time

Learn More
Sin Time

Unity sin time

Learn More
Time

Time in seconds with a scale multiplier

Learn More
Time Parameters

Time since level load

Learn More

Back to Top


Trigonometry Operators

ACos

Arccosine of scalars and vectors

Learn More
ASin

Arcsine of scalars and vectors

Learn More
ATan

Arctangent of scalars and vectors

Learn More
ATan2

Arctangent of y/x

Learn More
Cos

Cosine of scalars and vectors

Learn More
Cosh

Hyperbolic cosine of scalars and vectors

Learn More
Degrees

Converts values of scalars and vectors from radians to degrees

Learn More
Radians

Converts values of scalars and vectors from degrees to radians

Learn More
Sin

Sine of scalars and vectors

Learn More
Sinh

Hyperbolic sine of scalars and vectors

Learn More
Tan

Tangent of scalars and vectors

Learn More
Tanh

Hyperbolic tangent of scalars and vectors

Learn More

Back to Top


UV Coordinates

Flipbook UV Animation

Animate a Flipbook Texture Modifying UV Coordinates.

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Panner

Pans UV texture coordinates according to its inputs

Learn More
Parallax Mapping

Calculates offseted UVs for parallax mapping

Learn More
Parallax Occlusion Mapping

Calculates offseted UVs for parallax occlusion mapping

Learn More
Parallax Offset

Calculates UV offset for parallax normal mapping

Learn More
Pixelate UV

Pixelate Texture Modifying UV.

( originally by The Four Headed Cat - @fourheadedcat ) Learn More
Rotator

Rotates UVs or any Vector2 value from an Anchor point for a specified Time value

Learn More
Texture Coordinates

Texture UV coordinates set, if Tex is connected to a texture object it will use that texture scale factors, otherwise uses Tilling and Offset port values

Learn More

Back to Top


Vector Operators

Append

Append channels to create a new component

Learn More
Break To Components

Breaks the input data into its individual components

Learn More
Component Mask

Mask certain channels from vectors/color components

Learn More
Cross

Cross product of two three-component vectors ( A x B )

Learn More
Distance

Euclidean distance between two points

Learn More
Dot

Scalar dot product of two vectors ( A . B )

Learn More
Length

Scalar Euclidean length of a vector

Learn More
Normalize

Normalizes a vector

Learn More
Reflect

Reflection vector given an incidence vector and a normal vector

Learn More
Refract

Computes a refraction vector

Learn More
Swizzle

Swizzle components of vector types

( originally by Tobias Pott - @TobiasPott ) Learn More
Transform Direction

Transforms a direction vector from one space to another

Learn More

Back to Top


Vertex Data

Face

Indicates whether the rendered surface is facing the camera (1), or facing away from the camera(-1)

Learn More
Object Scale

Object Scale extracted directly from its transform matrix

Learn More
Template Vertex Data

Select and use available vertex data from the template

Learn More
Vertex Bitangent

Calculated bitangent vector in object space, can be used in both local vertex offset and fragment outputs. Already has tangent sign and object transform into account

Learn More
Vertex Color

Vertex color interpolated on fragment

Learn More
Vertex Normal

Vertex normal vector in object space, can be used in both local vertex offset and fragment outputs

Learn More
Vertex Position

Vertex position vector in object space, can be used in both local vertex offset and fragment outputs

Learn More
Vertex Tangent

Vertex tangent vector in object space, can be used in both local vertex offset and fragment outputs

Learn More
Vertex Tangent Sign

Vertex tangent sign in object space, return the W value of tangent vector that contains only the sign of the tangent

Learn More
Vertex TexCoord

Vertex texture coordinates, can be used in both local vertex offset and fragment outputs

Learn More

Back to Top