Files
cloud-mainworld/ufm cloud/Library/PackageCache/com.unity.shadergraph@d526115bb944/Documentation~/Square-Wave-Node.md
T
wub 530cdbf98f animation riging
riged the lights to the root animatior ready for animation
2026-11-30 19:13:17 +00:00

619 B

Square Wave Node

Description

Returns a square wave from the value of input In.

Ports

Name Direction Type Description
In Input Dynamic Vector Input value
Out Output Dynamic Vector Output value

Generated Code Example

The following example code represents one possible outcome of this node.

void Unity_SquareWave_float4(float4 In, out float4 Out)
{
    Out = 1.0 - 2.0 * round(frac(In));
}

Additional resources

[!includenodes-example-samples]