Date: Mon, 2 Aug 2021 22:26:56 +0000 (UTC) Message-ID: <1619578637.3092.1627943216534@[54.89.207.250]> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_3091_2083911099.1627943216518" ------=_Part_3091_2083911099.1627943216518 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Math Shaders

A collection of mathematical shaders. Math shaders can work on c= olor or vector inputs.

#### Abs

Return the absolute value of input.

Return input1 input2= .

#### Atan

Return the arctangent of y/= x. The resulting value is in the range [-=CF=80/2, =CF=80/2]= , using the signs of the two arguments to determine the quadrant of th= e result.

#### Compare

Compare input1 and input2 with the following operators and return true or false:

• Equal (=3D=3D)
• Not Equal (!=3D)
• Greater Than (>)
• Less Than (<)
• Greater Than or Equal (>=3D)
• Less Than or Equal (<=3D)

#### Complement

Return one's complement (1 =E2= =88=92 input). Also known as revers= e video.

#### Cross

Compute the cros= s product between two vectors, defined as the vector perpendicular= to both input vectors, with its direction defined by the right-hand rule.

$$\mathbf{a}\times\mathbf{b}=3D\left(a= _{y}b_{z}-a_{z}b_{y}\,,\quad a_{z}b_{x}-a_{x}b_{z}\,,\quad a_{x}b_{y}-a_{y}= b_{x}\right)$$=20

The length of the cross product can be interpreted geometrically as:

= $$\left\Vert \mathbf{a}\times\mathbf{b} \right\Vert=3D\left\Vert \mathbf{= a}\right\Vert \left\Vert \mathbf{b}\right\Vert \sin\theta$$=20

#### Divide

Return input1 =C3=B7&nb= sp;input2.

#### Dot

Compute the dot product between two vec= tors as follows:

a=E2=8B=85b=3Da x b x +a&= nbsp;y b = y +a z b z

The result is a scalar value that can be interpreted= geometrically as:

a=E2=8B=85b=3D=E2=88=A5a= =E2=88=A5=E2=88=A5= b=E2=88=A5cos=CE=B8

where the length of vector a&n= bsp;is denoted by

=E2=88=A5a=E2=88=A5

and the angle between a a= nd b is =CE=B8.

#### Exp

Return the exponential=  of input, einput. This is the = inverse of Ln, see also Pow.

#### Fraction

Returns the fractional part of input. For example, an in= put of 123.456 would return 0.456.

#### Is Finite

Return false if input is either infinity or NaN, and true otherwise.=

#### Length

Return the length of the input vector, with three pos= sible distance definitions:

###### Euclidian

The "ordinary" length of the vector:  $$\sqrt{x^2+y^2+z^2}$$

Euclidian distance squared, which is cheaper to compute:  $$x^2+y^= 2+z^2$$

#### Subtract

Return input1 =E2=88=92 input2.

#### Trigo

Perform various trigonometric functions on input. The = ;frequency and phase parameters make the m= ost sense for the sine, cosine and tangent functions, but are available on = all functions for orthogonality. The units parameter let= s you choose between radians and degrees for the argument of sine, cosine, and tange= nt and for the result of the inverse functions. It has no effect on the hyp= erbolic functions.

Function Formula Units Affects Output Range
Cosine<= /a> cos(input =C3=97 frequency + phase)

&= nbsp;

argument

[-1, 1]
Sine sin(input =C3=97 frequency + pha= se) [-1, 1]
Tangent= tan(input =C3=97 frequency + pha= se) [-=E2=88=9E, =E2= =88=9E]
Arccosine= arcco= s(input =C3=97 frequency + = phase)

&= nbsp;

result

[0, =CF=80] or [0= =C2=B0, 180=C2=B0]
Arcsine arcsi= n(input =C3=97 frequency + = phase) [-=CF=80/2, =CF=80= /2] or [-90=C2=B0, 90=C2=B0]
Arctangen= t arcta= n(input =C3=97 frequency + = phase) [-=CF=80/2, =CF=80= /2] or [-90=C2=B0, 90=C2=B0]
Hyperbolic Cosine cosh<= /code>(input =C3=97 frequency + ph= ase)

&= nbsp;

(nothing)

[1, =E2=88=9E]
Hyperbolic Sine<= /td> sinh<= /code>(input =C3=97 frequency + ph= ase) [-=E2=88=9E, =E2= =88=9E]
Hyperbolic Tangent tanh<= /code>(input =C3=97 frequency + ph= ase) [-1, 1]

------=_Part_3091_2083911099.1627943216518--