step - HLSL

Returns (x >= y) ? 1 : 0.

Syntax

ret step(y, x)

Where:

Name In/Out Template Type Component Type Size
y in scalar, vector, or matrix float any
x in same as input y float same dimension(s) as input y
ret out same as input y float same dimension(s) as input y

Minimum Shader Version

This intrinsic function is supported in the following (or above) shader versions:

Vertex Shader Pixel Shader
vs_1_1 ps_1_4

See Also

HLSL Intrinsic Functions