Main Page Sitemap

GLSL mix

gLSL mix

sine is calculated separately for every component. Float log(float x) vec2 log(vec2 x) vec3 log(vec3 x) vec4 log(vec4 x) The log function returns the power to which the constant e has to be raised to produce. Float smoothstep(float edge0, float edge1, float x) vec2 smoothstep(vec2 edge0, vec2 edge1, vec2 x) vec3 smoothstep(vec3 edge0, vec3 edge1, vec3 x) vec4 smoothstep(vec4 edge0, vec4 edge1, vec4 x) The smoothstep function returns.0 if x is smaller then edge0 and.0 if x is larger. Float mod(float x, float y) vec2 mod(vec2 x, vec2 y) vec3 mod(vec3 x, vec3 y) vec4 mod(vec4 x, vec4 y) The mod function returns x minus the product of y and floor(x/y). Bvec2 notEqual(vec2 x, vec2 y) bvec3 notEqual(vec3 x, vec3 y) bvec4 notEqual(vec4 x, vec4 y) bvec2 notEqual(ivec2 x, ivec2 y) bvec3 notEqual(ivec3 x, ivec3 y) bvec4 notEqual(ivec4 x, ivec4 y) The notEqual function returns a boolean vector as result of a component-wise comparison in the. The asin function returns the arcsine of an angle in radians. Float normalize(float x) vec2 normalize(vec2 x) vec3 normalize(vec3 x) vec4 normalize(vec4 x) The normalize function returns a vector with length.0 that is parallel to x,.e.

The return value is computed as x times (1 - a) y times.
Glsl, functions opengl ES shading language built-IN functions This is a reference for the built-in functions of the OpenGL ES Shading Language that is described in the OpenGL ES Shading Language specification.
The return value is computed as x(1a)ya.

Float acos(float x) vec2 acos(vec2 x) vec3 acos(vec3 x) vec4 acos(vec4 x the acos function returns the arccosine of an angle in radians. In case of a float vector the arcsine is calculated separately for every component. Float asin(float x) vec2 asin(vec2 x) vec3 asin(vec3 x) vec4 asin(vec4 x). For a component of a that is true, the corresponding component of y is returned. Float refract(float I, float N, float eta) vec2 refract(vec2 I, vec2 N, float eta) vec3 refract(vec3 I, vec3 N, float eta) vec4 refract(vec4 I, vec4 N, float eta) The refract function returns a vector that points in the direction of refraction. In case of a float vector all components are converted from degrees to radians separately. It is the inverse function of cosine. In case of a floating scalar the normalize function is trivial and returns.0. Side note: To obtain the desired result the vector N has to be normalized.