You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Manoylov Andriy eb8d3c5f80 add ukrainian translation 10 months ago
..
README-ua.md add ukrainian translation 10 months ago
README-vi.md Translate the glossary section 4 years ago
README.md Remove trailing whitespaces 7 years ago

README.md

Step

Generate a step function by comparing two values

Declaration

float step(float edge, float x)  
vec2 step(vec2 edge, vec2 x)  
vec3 step(vec3 edge, vec3 x)  
vec4 step(vec4 edge, vec4 x)

vec2 step(float edge, vec2 x)  
vec3 step(float edge, vec3 x)  
vec4 step(float edge, vec4 x)

Parameters

edge specifies the location of the edge of the step function.

x specify the value to be used to generate the step function.

Description

step() generates a step function by comparing x to edge.

For element i of the return value, 0.0 is returned if x[i] < edge[i], and 1.0 is returned otherwise.

See Also

mix, smoothstep, Chapter 05: Shaping Functions