GPU Core

GPU defines and functions.

Functions

Return type

Description

FfxFloat32

Compute the square root of a value.

FfxFloat32x2

Compute the square root of a value.

FfxFloat32x3

Compute the square root of a value.

FfxFloat32x4

Compute the square root of a value.

FfxFloat32

Compute the min of two values.

FfxFloat32x2

Compute the min of two values.

FfxFloat32x3

Compute the min of two values.

FfxFloat32x4

Compute the min of two values.

FfxInt32

Compute the min of two values.

FfxInt32x2

Compute the min of two values.

FfxInt32x3

Compute the min of two values.

FfxInt32x4

Compute the min of two values.

FfxUInt32

Compute the min of two values.

FfxUInt32x2

Compute the min of two values.

FfxUInt32x3

Compute the min of two values.

FfxUInt32x4

Compute the min of two values.

FfxFloat32

Compute the max of two values.

FfxFloat32x2

Compute the max of two values.

FfxFloat32x3

Compute the max of two values.

FfxFloat32x4

Compute the max of two values.

FfxInt32

Compute the max of two values.

FfxInt32x2

Compute the max of two values.

FfxInt32x3

Compute the max of two values.

FfxInt32x4

Compute the max of two values.

FfxUInt32

Compute the max of two values.

FfxUInt32x2

Compute the max of two values.

FfxUInt32x3

Compute the max of two values.

FfxUInt32x4

Compute the max of two values.

FfxFloat32

Compute the value of the first parameter raised to the power of the second.

FfxFloat32x2

Compute the value of the first parameter raised to the power of the second.

FfxFloat32x3

Compute the value of the first parameter raised to the power of the second.

FfxFloat32x4

Compute the value of the first parameter raised to the power of the second.

FfxFloat32

Copy the sign bit from ‘s’ to positive ‘d’.

FfxFloat32x2

Copy the sign bit from ‘s’ to positive ‘d’.

FfxFloat32x3

Copy the sign bit from ‘s’ to positive ‘d’.

FfxFloat32x4

Copy the sign bit from ‘s’ to positive ‘d’.

FfxFloat32

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

FfxFloat32x2

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

FfxFloat32x3

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

FfxFloat32x4

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

FfxFloat32

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

FfxFloat32x2

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

FfxFloat32x3

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

FfxFloat32x4

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

FfxUInt32

Convert a 32bit floating point value to sortable integer.

FfxUInt32

Convert a sortable integer to a 32bit floating point value.

FfxFloat32

Calculate a low-quality approximation for the square root of a value.

FfxFloat32

Calculate a low-quality approximation for the reciprocal of a value.

FfxFloat32

Calculate a medium-quality approximation for the reciprocal of a value.

FfxFloat32

Calculate a low-quality approximation for the reciprocal of a value.

FfxFloat32x2

Calculate a low-quality approximation for the square root of a value.

FfxFloat32x2

Calculate a low-quality approximation for the reciprocal of a value.

FfxFloat32x2

Calculate a medium-quality approximation for the reciprocal of a value.

FfxFloat32x2

Calculate a low-quality approximation for the square root of a value.

FfxFloat32x3

Calculate a low-quality approximation for the square root of a value.

FfxFloat32x3

Calculate a low-quality approximation for the reciprocal of a value.

FfxFloat32x3

Calculate a medium-quality approximation for the reciprocal of a value.

FfxFloat32x3

Calculate a low-quality approximation for the square root of a value.

FfxFloat32x4

Calculate a low-quality approximation for the square root of a value.

FfxFloat32x4

Calculate a low-quality approximation for the reciprocal of a value.

FfxFloat32x4

Calculate a medium-quality approximation for the reciprocal of a value.

FfxFloat32x4

Calculate a low-quality approximation for the square root of a value.

FfxFloat32

Calculate dot product of ‘a’ and ‘b’.

FfxFloat32

Calculate dot product of ‘a’ and ‘b’.

FfxFloat32

Calculate dot product of ‘a’ and ‘b’.

FfxFloat32

Compute an approximate conversion from PQ to Gamma2 space.

FfxFloat32

Compute an approximate conversion from PQ to linear space.

FfxFloat32

Compute an approximate conversion from gamma2 to PQ space.

FfxFloat32

Compute a more accurate approximate conversion from gamma2 to PQ space.

FfxFloat32

Compute a high accuracy approximate conversion from gamma2 to PQ space.

FfxFloat32

Compute an approximate conversion from linear to PQ space.

FfxFloat32

Compute a more accurate approximate conversion from linear to PQ space.

FfxFloat32

Compute a very accurate approximate conversion from linear to PQ space.

FfxFloat32x2

Compute an approximate conversion from PQ to Gamma2 space.

FfxFloat32x2

Compute an approximate conversion from PQ to linear space.

FfxFloat32x2

Compute an approximate conversion from gamma2 to PQ space.

FfxFloat32x2

Compute a more accurate approximate conversion from gamma2 to PQ space.

FfxFloat32x2

Compute a high accuracy approximate conversion from gamma2 to PQ space.

FfxFloat32x2

Compute an approximate conversion from linear to PQ space.

FfxFloat32x2

Compute a more accurate approximate conversion from linear to PQ space.

FfxFloat32x2

Compute a very accurate approximate conversion from linear to PQ space.

FfxFloat32x3

Compute an approximate conversion from PQ to Gamma2 space.

FfxFloat32x3

Compute an approximate conversion from PQ to linear space.

FfxFloat32x3

Compute an approximate conversion from gamma2 to PQ space.

FfxFloat32x3

Compute a more accurate approximate conversion from gamma2 to PQ space.

FfxFloat32x3

Compute a high accuracy approximate conversion from gamma2 to PQ space.

FfxFloat32x3

Compute an approximate conversion from linear to PQ space.

FfxFloat32x3

Compute a more accurate approximate conversion from linear to PQ space.

FfxFloat32x3

Compute a very accurate approximate conversion from linear to PQ space.

FfxFloat32x4

Compute an approximate conversion from PQ to Gamma2 space.

FfxFloat32x4

Compute an approximate conversion from PQ to linear space.

FfxFloat32x4

Compute an approximate conversion from gamma2 to PQ space.

FfxFloat32x4

Compute a more accurate approximate conversion from gamma2 to PQ space.

FfxFloat32x4

Compute a high accuracy approximate conversion from gamma2 to PQ space.

FfxFloat32x4

Compute an approximate conversion from linear to PQ space.

FfxFloat32x4

Compute a more accurate approximate conversion from linear to PQ space.

FfxFloat32x4

Compute a very accurate approximate conversion from linear to PQ space.

FfxUInt32

Conditional free logic AND operation using values.

FfxUInt32x2

Conditional free logic AND operation using two values.

FfxUInt32x3

Conditional free logic AND operation using two values.

FfxUInt32x4

Conditional free logic AND operation using two values.

FfxUInt32

Conditional free logic NOT operation using two values.

FfxUInt32x2

Conditional free logic NOT operation using two values.

FfxUInt32x3

Conditional free logic NOT operation using two values.

FfxUInt32x4

Conditional free logic NOT operation using two values.

FfxUInt32

Conditional free logic OR operation using two values.

FfxUInt32x2

Conditional free logic OR operation using two values.

FfxUInt32x3

Conditional free logic OR operation using two values.

FfxUInt32x4

Conditional free logic OR operation using two values.

FfxUInt32

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

FfxUInt32x2

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

FfxUInt32x3

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

FfxUInt32x4

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

FfxFloat32

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

FfxFloat32x2

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

FfxFloat32x3

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

FfxFloat32x4

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

FfxFloat32

Given a value, returns 1.0 if greater than zero and 0.0 if not.

FfxFloat32x2

Given a value, returns 1.0 if greater than zero and 0.0 if not.

FfxFloat32x3

Given a value, returns 1.0 if greater than zero and 0.0 if not.

FfxFloat32x4

Given a value, returns 1.0 if greater than zero and 0.0 if not.

FfxFloat32

Conditional free logic signed NOT operation using two FfxFloat32 values.

FfxFloat32x2

Conditional free logic signed NOT operation using two FfxFloat32 values.

FfxFloat32x3

Conditional free logic signed NOT operation using two FfxFloat32 values.

FfxFloat32x4

Conditional free logic signed NOT operation using two FfxFloat32 values.

FfxFloat32

Conditional free logic OR operation using two FfxFloat32 values.

FfxFloat32x2

Conditional free logic OR operation using two FfxFloat32 values.

FfxFloat32x3

Conditional free logic OR operation using two FfxFloat32 values.

FfxFloat32x4

Conditional free logic OR operation using two FfxFloat32 values.

FfxFloat32

Choose between two FfxFloat32 values if the first paramter is greater than zero.

FfxFloat32x2

Choose between two FfxFloat32 values if the first paramter is greater than zero.

FfxFloat32x3

Choose between two FfxFloat32 values if the first paramter is greater than zero.

FfxFloat32x4

Choose between two FfxFloat32 values if the first paramter is greater than zero.

FfxFloat32

Given a value, returns 1.0 if less than zero and 0.0 if not.

FfxFloat32x2

Given a value, returns 1.0 if less than zero and 0.0 if not.

FfxFloat32x3

Given a value, returns 1.0 if less than zero and 0.0 if not.

FfxFloat32x4

Given a value, returns 1.0 if less than zero and 0.0 if not.

FfxFloat32

Compute a Rec.709 color space.

FfxFloat32x2

Compute a Rec.709 color space.

FfxFloat32x3

Compute a Rec.709 color space.

FfxFloat32

Compute a linear value from a REC.709 value.

FfxFloat32x2

Compute a linear value from a REC.709 value.

FfxFloat32x3

Compute a linear value from a REC.709 value.

FfxFloat32

Compute a gamma value from a linear value.

FfxFloat32x2

Compute a gamma value from a linear value.

FfxFloat32x3

Compute a gamma value from a linear value.

FfxFloat32

Compute a linear value from a value in a gamma space.

FfxFloat32x2

Compute a linear value from a value in a gamma space.

FfxFloat32x3

Compute a linear value from a value in a gamma space.

FfxFloat32

Compute a PQ value from a linear value.

FfxFloat32x2

Compute a PQ value from a linear value.

FfxFloat32x3

Compute a PQ value from a linear value.

FfxFloat32

Compute a linear value from a value in a PQ space.

FfxFloat32x2

Compute a linear value from a value in a PQ space.

FfxFloat32x3

Compute a linear value from a value in a PQ space.

FfxFloat32

Compute an SRGB value from a linear value.

FfxFloat32x2

Compute an SRGB value from a linear value.

FfxFloat32x3

Compute an SRGB value from a linear value.

FfxFloat32

Compute a linear value from a value in a SRGB space.

FfxFloat32x2

Compute a linear value from a value in a SRGB space.

FfxFloat32x3

Compute a linear value from a value in a SRGB space.

FfxUInt32x2

A remapping of 64×1 to 8×8 imposing rotated 2×2 pixel quads in quad linear.

FfxUInt32x2

A helper function performing a remap 64×1 to 8×8 remapping which is necessary for 2D wave reductions.

Macros

Name

Description

FFX_FALSE (false)

A define for a false value in a boolean expression.

FFX_NEGATIVE_INFINITY_FLOAT ffxAsFloat(0xff800000u)

A define value for negative infinity.

FFX_PI (3.14159)

A define value for PI.

FFX_POSITIVE_INFINITY_FLOAT ffxAsFloat(0x7f800000u)

A define value for positive infinity.

FFX_TRUE (true)

A define for a true value in a boolean expression.

Detailed description

GPU defines and functions.

Global functions

ffxSqrt

Copied!

FfxFloat32  ffxSqrt (FfxFloat32  x)

Compute the square root of a value.

Parameters:

x

The first value to compute the min of.

Returns:

The the square root of x.


ffxSqrt

Copied!

FfxFloat32x2  ffxSqrt (FfxFloat32x2  x)

Compute the square root of a value.

Parameters:

x

The first value to compute the min of.

Returns:

The the square root of x.


ffxSqrt

Copied!

FfxFloat32x3  ffxSqrt (FfxFloat32x3  x)

Compute the square root of a value.

Parameters:

x

The first value to compute the min of.

Returns:

The the square root of x.


ffxSqrt

Copied!

FfxFloat32x4  ffxSqrt (FfxFloat32x4  x)

Compute the square root of a value.

Parameters:

x

The first value to compute the min of.

Returns:

The the square root of x.


ffxMin

Copied!

FfxFloat32  ffxMin (FfxFloat32  x, FfxFloat32  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxFloat32x2  ffxMin (FfxFloat32x2  x, FfxFloat32x2  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxFloat32x3  ffxMin (FfxFloat32x3  x, FfxFloat32x3  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxFloat32x4  ffxMin (FfxFloat32x4  x, FfxFloat32x4  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxInt32  ffxMin (FfxInt32  x, FfxInt32  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxInt32x2  ffxMin (FfxInt32x2  x, FfxInt32x2  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxInt32x3  ffxMin (FfxInt32x3  x, FfxInt32x3  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxInt32x4  ffxMin (FfxInt32x4  x, FfxInt32x4  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxUInt32  ffxMin (FfxUInt32  x, FfxUInt32  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxUInt32x2  ffxMin (FfxUInt32x2  x, FfxUInt32x2  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxUInt32x3  ffxMin (FfxUInt32x3  x, FfxUInt32x3  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMin

Copied!

FfxUInt32x4  ffxMin (FfxUInt32x4  x, FfxUInt32x4  y)

Compute the min of two values.

Parameters:

x

The first value to compute the min of.

y

The second value to compute the min of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxFloat32  ffxMax (FfxFloat32  x, FfxFloat32  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxFloat32x2  ffxMax (FfxFloat32x2  x, FfxFloat32x2  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxFloat32x3  ffxMax (FfxFloat32x3  x, FfxFloat32x3  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxFloat32x4  ffxMax (FfxFloat32x4  x, FfxFloat32x4  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxInt32  ffxMax (FfxInt32  x, FfxInt32  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxInt32x2  ffxMax (FfxInt32x2  x, FfxInt32x2  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxInt32x3  ffxMax (FfxInt32x3  x, FfxInt32x3  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxInt32x4  ffxMax (FfxInt32x4  x, FfxInt32x4  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxUInt32  ffxMax (FfxUInt32  x, FfxUInt32  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxUInt32x2  ffxMax (FfxUInt32x2  x, FfxUInt32x2  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxUInt32x3  ffxMax (FfxUInt32x3  x, FfxUInt32x3  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxMax

Copied!

FfxUInt32x4  ffxMax (FfxUInt32x4  x, FfxUInt32x4  y)

Compute the max of two values.

Parameters:

x

The first value to compute the max of.

y

The second value to compute the max of.

Returns:

The the lowest of two values.


ffxPow

Copied!

FfxFloat32  ffxPow (FfxFloat32  x, FfxFloat32  y)

Compute the value of the first parameter raised to the power of the second.

Parameters:

x

The value to raise to the power y.

y

The power to which to raise x.

Returns:

The value of the first parameter raised to the power of the second.


ffxPow

Copied!

FfxFloat32x2  ffxPow (FfxFloat32x2  x, FfxFloat32x2  y)

Compute the value of the first parameter raised to the power of the second.

Parameters:

x

The value to raise to the power y.

y

The power to which to raise x.

Returns:

The value of the first parameter raised to the power of the second.


ffxPow

Copied!

FfxFloat32x3  ffxPow (FfxFloat32x3  x, FfxFloat32x3  y)

Compute the value of the first parameter raised to the power of the second.

Parameters:

x

The value to raise to the power y.

y

The power to which to raise x.

Returns:

The value of the first parameter raised to the power of the second.


ffxPow

Copied!

FfxFloat32x4  ffxPow (FfxFloat32x4  x, FfxFloat32x4  y)

Compute the value of the first parameter raised to the power of the second.

Parameters:

x

The value to raise to the power y.

y

The power to which to raise x.

Returns:

The value of the first parameter raised to the power of the second.


ffxCopySignBit

Copied!

FfxFloat32  ffxCopySignBit (FfxFloat32  d, FfxFloat32  s)

Copy the sign bit from ‘s’ to positive ‘d’.

Parameters:

d

The value to copy the sign bit into.

s

The value to copy the sign bit from.

Returns:

The value of d with the sign bit from s.


ffxCopySignBit

Copied!

FfxFloat32x2  ffxCopySignBit (FfxFloat32x2  d, FfxFloat32x2  s)

Copy the sign bit from ‘s’ to positive ‘d’.

Parameters:

d

The value to copy the sign bit into.

s

The value to copy the sign bit from.

Returns:

The value of d with the sign bit from s.


ffxCopySignBit

Copied!

FfxFloat32x3  ffxCopySignBit (FfxFloat32x3  d, FfxFloat32x3  s)

Copy the sign bit from ‘s’ to positive ‘d’.

Parameters:

d

The value to copy the sign bit into.

s

The value to copy the sign bit from.

Returns:

The value of d with the sign bit from s.


ffxCopySignBit

Copied!

FfxFloat32x4  ffxCopySignBit (FfxFloat32x4  d, FfxFloat32x4  s)

Copy the sign bit from ‘s’ to positive ‘d’.

Parameters:

d

The value to copy the sign bit into.

s

The value to copy the sign bit from.

Returns:

The value of d with the sign bit from s.


ffxIsSigned

Copied!

FfxFloat32  ffxIsSigned (FfxFloat32  m)

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

Uses the following useful floating point logic, saturate(+a*(-INF)==-INF) := 0 saturate( 0*(-INF)== NaN) := 0 saturate(-a*(-INF)==+INF) := 1

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against 0.

Returns:

1.0 when the value is negative, or 0.0 when the value is 0 or position.


ffxIsSigned

Copied!

FfxFloat32x2  ffxIsSigned (FfxFloat32x2  m)

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

Uses the following useful floating point logic, saturate(+a*(-INF)==-INF) := 0 saturate( 0*(-INF)== NaN) := 0 saturate(-a*(-INF)==+INF) := 1

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against 0.

Returns:

1.0 when the value is negative, or 0.0 when the value is 0 or position.


ffxIsSigned

Copied!

FfxFloat32x3  ffxIsSigned (FfxFloat32x3  m)

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

Uses the following useful floating point logic, saturate(+a*(-INF)==-INF) := 0 saturate( 0*(-INF)== NaN) := 0 saturate(-a*(-INF)==+INF) := 1

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against 0.

Returns:

1.0 when the value is negative, or 0.0 when the value is 0 or position.


ffxIsSigned

Copied!

FfxFloat32x4  ffxIsSigned (FfxFloat32x4  m)

A single operation to return the following: m = NaN := 0 m >= 0 := 0 m < 0 := 1.

Uses the following useful floating point logic, saturate(+a*(-INF)==-INF) := 0 saturate( 0*(-INF)== NaN) := 0 saturate(-a*(-INF)==+INF) := 1

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against for have the sign set.

Returns:

1.0 when the value is negative, or 0.0 when the value is 0 or positive.


ffxIsGreaterThanZero

Copied!

FfxFloat32  ffxIsGreaterThanZero (FfxFloat32  m)

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against zero.

Returns:

1.0 when the value is position, or 0.0 when the value is 0 or negative.


ffxIsGreaterThanZero

Copied!

FfxFloat32x2  ffxIsGreaterThanZero (FfxFloat32x2  m)

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against zero.

Returns:

1.0 when the value is position, or 0.0 when the value is 0 or negative.


ffxIsGreaterThanZero

Copied!

FfxFloat32x3  ffxIsGreaterThanZero (FfxFloat32x3  m)

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against zero.

Returns:

1.0 when the value is position, or 0.0 when the value is 0 or negative.


ffxIsGreaterThanZero

Copied!

FfxFloat32x4  ffxIsGreaterThanZero (FfxFloat32x4  m)

A single operation to return the following: m = NaN := 1 m > 0 := 0 m <= 0 := 1.

This function is useful when creating masks for branch-free logic.

Parameters:

m

The value to test against zero.

Returns:

1.0 when the value is position, or 0.0 when the value is 0 or negative.


ffxFloatToSortableInteger

Copied!

FfxUInt32  ffxFloatToSortableInteger (FfxUInt32  value)

Convert a 32bit floating point value to sortable integer.

  • If sign bit=0, flip the sign bit (positives).

  • If sign bit=1, flip all bits (negatives).

The function has the side effects that:

  • Larger integers are more positive values.

  • Float zero is mapped to center of integers (so clear to integer zero is a nice default for atomic max usage).

Parameters:

value

The floating point value to make sortable.

Returns:

The sortable integer value.


ffxSortableIntegerToFloat

Copied!

FfxUInt32  ffxSortableIntegerToFloat (FfxUInt32  value)

Convert a sortable integer to a 32bit floating point value.

The function has the side effects that:

  • If sign bit=1, flip the sign bit (positives).

  • If sign bit=0, flip all bits (negatives).

Parameters:

value

The floating point value to make sortable.

Returns:

The sortable integer value.


ffxApproximateSqrt

Copied!

FfxFloat32  ffxApproximateSqrt (FfxFloat32  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxApproximateReciprocal

Copied!

FfxFloat32  ffxApproximateReciprocal (FfxFloat32  value)

Calculate a low-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to low quality.


ffxApproximateReciprocalMedium

Copied!

FfxFloat32  ffxApproximateReciprocalMedium (FfxFloat32  value)

Calculate a medium-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to medium quality.


ffxApproximateReciprocalSquareRoot

Copied!

FfxFloat32  ffxApproximateReciprocalSquareRoot (FfxFloat32  value)

Calculate a low-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal square root for.

Returns:

An approximation of the reciprocal square root, estimated to low quality.


ffxApproximateSqrt

Copied!

FfxFloat32x2  ffxApproximateSqrt (FfxFloat32x2  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxApproximateReciprocal

Copied!

FfxFloat32x2  ffxApproximateReciprocal (FfxFloat32x2  value)

Calculate a low-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to low quality.


ffxApproximateReciprocalMedium

Copied!

FfxFloat32x2  ffxApproximateReciprocalMedium (FfxFloat32x2  value)

Calculate a medium-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to medium quality.


ffxApproximateReciprocalSquareRoot

Copied!

FfxFloat32x2  ffxApproximateReciprocalSquareRoot (FfxFloat32x2  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxApproximateSqrt

Copied!

FfxFloat32x3  ffxApproximateSqrt (FfxFloat32x3  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxApproximateReciprocal

Copied!

FfxFloat32x3  ffxApproximateReciprocal (FfxFloat32x3  value)

Calculate a low-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to low quality.


ffxApproximateReciprocalMedium

Copied!

FfxFloat32x3  ffxApproximateReciprocalMedium (FfxFloat32x3  value)

Calculate a medium-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to medium quality.


ffxApproximateReciprocalSquareRoot

Copied!

FfxFloat32x3  ffxApproximateReciprocalSquareRoot (FfxFloat32x3  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxApproximateSqrt

Copied!

FfxFloat32x4  ffxApproximateSqrt (FfxFloat32x4  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxApproximateReciprocal

Copied!

FfxFloat32x4  ffxApproximateReciprocal (FfxFloat32x4  value)

Calculate a low-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to low quality.


ffxApproximateReciprocalMedium

Copied!

FfxFloat32x4  ffxApproximateReciprocalMedium (FfxFloat32x4  value)

Calculate a medium-quality approximation for the reciprocal of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the reciprocal for.

Returns:

An approximation of the reciprocal, estimated to medium quality.


ffxApproximateReciprocalSquareRoot

Copied!

FfxFloat32x4  ffxApproximateReciprocalSquareRoot (FfxFloat32x4  value)

Calculate a low-quality approximation for the square root of a value.

For additional information on the approximation family of functions, you can refer to Michal Drobot’s excellent presentation materials:

Parameters:

value

The value to calculate an approximate to the square root for.

Returns:

An approximation of the square root, estimated to low quality.


ffxDot2

Copied!

FfxFloat32  ffxDot2 (FfxFloat32x2  a, FfxFloat32x2  b)

Calculate dot product of ‘a’ and ‘b’.

Parameters:

a

First vector input.

b

Second vector input.

Returns:

The value of a dot b.


ffxDot3

Copied!

FfxFloat32  ffxDot3 (FfxFloat32x3  a, FfxFloat32x3  b)

Calculate dot product of ‘a’ and ‘b’.

Parameters:

a

First vector input.

b

Second vector input.

Returns:

The value of a dot b.


ffxDot4

Copied!

FfxFloat32  ffxDot4 (FfxFloat32x4  a, FfxFloat32x4  b)

Calculate dot product of ‘a’ and ‘b’.

Parameters:

a

First vector input.

b

Second vector input.

Returns:

The value of a dot b.


ffxApproximatePQToGamma2Medium

Copied!

FfxFloat32  ffxApproximatePQToGamma2Medium (FfxFloat32  a)

Compute an approximate conversion from PQ to Gamma2 space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and Gamma2.

Returns:

The value a converted into Gamma2.


ffxApproximatePQToLinear

Copied!

FfxFloat32  ffxApproximatePQToLinear (FfxFloat32  a)

Compute an approximate conversion from PQ to linear space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and linear.

Returns:

The value a converted into linear.


ffxApproximateGamma2ToPQ

Copied!

FfxFloat32  ffxApproximateGamma2ToPQ (FfxFloat32  a)

Compute an approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQMedium

Copied!

FfxFloat32  ffxApproximateGamma2ToPQMedium (FfxFloat32  a)

Compute a more accurate approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQHigh

Copied!

FfxFloat32  ffxApproximateGamma2ToPQHigh (FfxFloat32  a)

Compute a high accuracy approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQ

Copied!

FfxFloat32  ffxApproximateLinearToPQ (FfxFloat32  a)

Compute an approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQMedium

Copied!

FfxFloat32  ffxApproximateLinearToPQMedium (FfxFloat32  a)

Compute a more accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQHigh

Copied!

FfxFloat32  ffxApproximateLinearToPQHigh (FfxFloat32  a)

Compute a very accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximatePQToGamma2Medium

Copied!

FfxFloat32x2  ffxApproximatePQToGamma2Medium (FfxFloat32x2  a)

Compute an approximate conversion from PQ to Gamma2 space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and Gamma2.

Returns:

The value a converted into Gamma2.


ffxApproximatePQToLinear

Copied!

FfxFloat32x2  ffxApproximatePQToLinear (FfxFloat32x2  a)

Compute an approximate conversion from PQ to linear space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and linear.

Returns:

The value a converted into linear.


ffxApproximateGamma2ToPQ

Copied!

FfxFloat32x2  ffxApproximateGamma2ToPQ (FfxFloat32x2  a)

Compute an approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQMedium

Copied!

FfxFloat32x2  ffxApproximateGamma2ToPQMedium (FfxFloat32x2  a)

Compute a more accurate approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQHigh

Copied!

FfxFloat32x2  ffxApproximateGamma2ToPQHigh (FfxFloat32x2  a)

Compute a high accuracy approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQ

Copied!

FfxFloat32x2  ffxApproximateLinearToPQ (FfxFloat32x2  a)

Compute an approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQMedium

Copied!

FfxFloat32x2  ffxApproximateLinearToPQMedium (FfxFloat32x2  a)

Compute a more accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQHigh

Copied!

FfxFloat32x2  ffxApproximateLinearToPQHigh (FfxFloat32x2  a)

Compute a very accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximatePQToGamma2Medium

Copied!

FfxFloat32x3  ffxApproximatePQToGamma2Medium (FfxFloat32x3  a)

Compute an approximate conversion from PQ to Gamma2 space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and Gamma2.

Returns:

The value a converted into Gamma2.


ffxApproximatePQToLinear

Copied!

FfxFloat32x3  ffxApproximatePQToLinear (FfxFloat32x3  a)

Compute an approximate conversion from PQ to linear space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and linear.

Returns:

The value a converted into linear.


ffxApproximateGamma2ToPQ

Copied!

FfxFloat32x3  ffxApproximateGamma2ToPQ (FfxFloat32x3  a)

Compute an approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQMedium

Copied!

FfxFloat32x3  ffxApproximateGamma2ToPQMedium (FfxFloat32x3  a)

Compute a more accurate approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQHigh

Copied!

FfxFloat32x3  ffxApproximateGamma2ToPQHigh (FfxFloat32x3  a)

Compute a high accuracy approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQ

Copied!

FfxFloat32x3  ffxApproximateLinearToPQ (FfxFloat32x3  a)

Compute an approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQMedium

Copied!

FfxFloat32x3  ffxApproximateLinearToPQMedium (FfxFloat32x3  a)

Compute a more accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQHigh

Copied!

FfxFloat32x3  ffxApproximateLinearToPQHigh (FfxFloat32x3  a)

Compute a very accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximatePQToGamma2Medium

Copied!

FfxFloat32x4  ffxApproximatePQToGamma2Medium (FfxFloat32x4  a)

Compute an approximate conversion from PQ to Gamma2 space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and Gamma2.

Returns:

The value a converted into Gamma2.


ffxApproximatePQToLinear

Copied!

FfxFloat32x4  ffxApproximatePQToLinear (FfxFloat32x4  a)

Compute an approximate conversion from PQ to linear space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between PQ and linear.

Returns:

The value a converted into linear.


ffxApproximateGamma2ToPQ

Copied!

FfxFloat32x4  ffxApproximateGamma2ToPQ (FfxFloat32x4  a)

Compute an approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQMedium

Copied!

FfxFloat32x4  ffxApproximateGamma2ToPQMedium (FfxFloat32x4  a)

Compute a more accurate approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateGamma2ToPQHigh

Copied!

FfxFloat32x4  ffxApproximateGamma2ToPQHigh (FfxFloat32x4  a)

Compute a high accuracy approximate conversion from gamma2 to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between gamma2 and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQ

Copied!

FfxFloat32x4  ffxApproximateLinearToPQ (FfxFloat32x4  a)

Compute an approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQMedium

Copied!

FfxFloat32x4  ffxApproximateLinearToPQMedium (FfxFloat32x4  a)

Compute a more accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxApproximateLinearToPQHigh

Copied!

FfxFloat32x4  ffxApproximateLinearToPQHigh (FfxFloat32x4  a)

Compute a very accurate approximate conversion from linear to PQ space.

PQ is very close to x^(1/8). The functions below Use the fast FfxFloat32 approximation method to do PQ conversions to and from Gamma2 (4th power and fast 4th root), and PQ to and from Linear (8th power and fast 8th root). The maximum error is approximately 0.2%.

Parameters:

a

The value to convert between linear and PQ.

Returns:

The value a converted into PQ.


ffxZeroOneAnd

Copied!

FfxUInt32  ffxZeroOneAnd (FfxUInt32  x, FfxUInt32  y)

Conditional free logic AND operation using values.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

Returns:

Result of the AND operation.


ffxZeroOneAnd

Copied!

FfxUInt32x2  ffxZeroOneAnd (FfxUInt32x2  x, FfxUInt32x2  y)

Conditional free logic AND operation using two values.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

Returns:

Result of the AND operation.


ffxZeroOneAnd

Copied!

FfxUInt32x3  ffxZeroOneAnd (FfxUInt32x3  x, FfxUInt32x3  y)

Conditional free logic AND operation using two values.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

Returns:

Result of the AND operation.


ffxZeroOneAnd

Copied!

FfxUInt32x4  ffxZeroOneAnd (FfxUInt32x4  x, FfxUInt32x4  y)

Conditional free logic AND operation using two values.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

Returns:

Result of the AND operation.


ffxZeroOneAnd

Copied!

FfxUInt32  ffxZeroOneAnd (FfxUInt32  x)

Conditional free logic NOT operation using two values.

Parameters:

x

The first value to be fed into the NOT operator.

Returns:

Result of the NOT operation.


ffxZeroOneAnd

Copied!

FfxUInt32x2  ffxZeroOneAnd (FfxUInt32x2  x)

Conditional free logic NOT operation using two values.

Parameters:

x

The first value to be fed into the NOT operator.

Returns:

Result of the NOT operation.


ffxZeroOneAnd

Copied!

FfxUInt32x3  ffxZeroOneAnd (FfxUInt32x3  x)

Conditional free logic NOT operation using two values.

Parameters:

x

The first value to be fed into the NOT operator.

Returns:

Result of the NOT operation.


ffxZeroOneAnd

Copied!

FfxUInt32x4  ffxZeroOneAnd (FfxUInt32x4  x)

Conditional free logic NOT operation using two values.

Parameters:

x

The first value to be fed into the NOT operator.

Returns:

Result of the NOT operation.


ffxZeroOneOr

Copied!

FfxUInt32  ffxZeroOneOr (FfxUInt32  x, FfxUInt32  y)

Conditional free logic OR operation using two values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneOr

Copied!

FfxUInt32x2  ffxZeroOneOr (FfxUInt32x2  x, FfxUInt32x2  y)

Conditional free logic OR operation using two values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneOr

Copied!

FfxUInt32x3  ffxZeroOneOr (FfxUInt32x3  x, FfxUInt32x3  y)

Conditional free logic OR operation using two values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneOr

Copied!

FfxUInt32x4  ffxZeroOneOr (FfxUInt32x4  x, FfxUInt32x4  y)

Conditional free logic OR operation using two values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneAndToU1

Copied!

FfxUInt32  ffxZeroOneAndToU1 (FfxFloat32  x)

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndToU2

Copied!

FfxUInt32x2  ffxZeroOneAndToU2 (FfxFloat32x2  x)

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndToU3

Copied!

FfxUInt32x3  ffxZeroOneAndToU3 (FfxFloat32x3  x)

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndToU4

Copied!

FfxUInt32x4  ffxZeroOneAndToU4 (FfxFloat32x4  x)

Conditional free logic signed NOT operation using two half-precision FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndOr

Copied!

FfxFloat32  ffxZeroOneAndOr (FfxFloat32  x, FfxFloat32  y, FfxFloat32  z)

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

z

The second value to be fed into the OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndOr

Copied!

FfxFloat32x2  ffxZeroOneAndOr (
    FfxFloat32x2  x,
    FfxFloat32x2  y,
    FfxFloat32x2  z
)

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

z

The second value to be fed into the OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndOr

Copied!

FfxFloat32x3  ffxZeroOneAndOr (
    FfxFloat32x3  x,
    FfxFloat32x3  y,
    FfxFloat32x3  z
)

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

z

The second value to be fed into the OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAndOr

Copied!

FfxFloat32x4  ffxZeroOneAndOr (
    FfxFloat32x4  x,
    FfxFloat32x4  y,
    FfxFloat32x4  z
)

Conditional free logic AND operation using two values followed by a NOT operation using the resulting value and a third value.

Parameters:

x

The first value to be fed into the AND operator.

y

The second value to be fed into the AND operator.

z

The second value to be fed into the OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneIsGreaterThanZero

Copied!

FfxFloat32  ffxZeroOneIsGreaterThanZero (FfxFloat32  x)

Given a value, returns 1.0 if greater than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the greater than zero comparison.


ffxZeroOneIsGreaterThanZero

Copied!

FfxFloat32x2  ffxZeroOneIsGreaterThanZero (FfxFloat32x2  x)

Given a value, returns 1.0 if greater than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the greater than zero comparison.


ffxZeroOneIsGreaterThanZero

Copied!

FfxFloat32x3  ffxZeroOneIsGreaterThanZero (FfxFloat32x3  x)

Given a value, returns 1.0 if greater than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the greater than zero comparison.


ffxZeroOneIsGreaterThanZero

Copied!

FfxFloat32x4  ffxZeroOneIsGreaterThanZero (FfxFloat32x4  x)

Given a value, returns 1.0 if greater than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the greater than zero comparison.


ffxZeroOneAnd

Copied!

FfxFloat32  ffxZeroOneAnd (FfxFloat32  x)

Conditional free logic signed NOT operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAnd

Copied!

FfxFloat32x2  ffxZeroOneAnd (FfxFloat32x2  x)

Conditional free logic signed NOT operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAnd

Copied!

FfxFloat32x3  ffxZeroOneAnd (FfxFloat32x3  x)

Conditional free logic signed NOT operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneAnd

Copied!

FfxFloat32x4  ffxZeroOneAnd (FfxFloat32x4  x)

Conditional free logic signed NOT operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the AND OR operator.

Returns:

Result of the AND OR operation.


ffxZeroOneOr

Copied!

FfxFloat32  ffxZeroOneOr (FfxFloat32  x, FfxFloat32  y)

Conditional free logic OR operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneOr

Copied!

FfxFloat32x2  ffxZeroOneOr (FfxFloat32x2  x, FfxFloat32x2  y)

Conditional free logic OR operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneOr

Copied!

FfxFloat32x3  ffxZeroOneOr (FfxFloat32x3  x, FfxFloat32x3  y)

Conditional free logic OR operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneOr

Copied!

FfxFloat32x4  ffxZeroOneOr (FfxFloat32x4  x, FfxFloat32x4  y)

Conditional free logic OR operation using two FfxFloat32 values.

Parameters:

x

The first value to be fed into the OR operator.

y

The second value to be fed into the OR operator.

Returns:

Result of the OR operation.


ffxZeroOneSelect

Copied!

FfxFloat32  ffxZeroOneSelect (FfxFloat32  x, FfxFloat32  y, FfxFloat32  z)

Choose between two FfxFloat32 values if the first paramter is greater than zero.

Parameters:

x

The value to compare against zero.

y

The value to return if the comparision is greater than zero.

z

The value to return if the comparision is less than or equal to zero.

Returns:

The selected value.


ffxZeroOneSelect

Copied!

FfxFloat32x2  ffxZeroOneSelect (
    FfxFloat32x2  x,
    FfxFloat32x2  y,
    FfxFloat32x2  z
)

Choose between two FfxFloat32 values if the first paramter is greater than zero.

Parameters:

x

The value to compare against zero.

y

The value to return if the comparision is greater than zero.

z

The value to return if the comparision is less than or equal to zero.

Returns:

The selected value.


ffxZeroOneSelect

Copied!

FfxFloat32x3  ffxZeroOneSelect (
    FfxFloat32x3  x,
    FfxFloat32x3  y,
    FfxFloat32x3  z
)

Choose between two FfxFloat32 values if the first paramter is greater than zero.

Parameters:

x

The value to compare against zero.

y

The value to return if the comparision is greater than zero.

z

The value to return if the comparision is less than or equal to zero.

Returns:

The selected value.


ffxZeroOneSelect

Copied!

FfxFloat32x4  ffxZeroOneSelect (
    FfxFloat32x4  x,
    FfxFloat32x4  y,
    FfxFloat32x4  z
)

Choose between two FfxFloat32 values if the first paramter is greater than zero.

Parameters:

x

The value to compare against zero.

y

The value to return if the comparision is greater than zero.

z

The value to return if the comparision is less than or equal to zero.

Returns:

The selected value.


ffxZeroOneIsSigned

Copied!

FfxFloat32  ffxZeroOneIsSigned (FfxFloat32  x)

Given a value, returns 1.0 if less than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the sign value.


ffxZeroOneIsSigned

Copied!

FfxFloat32x2  ffxZeroOneIsSigned (FfxFloat32x2  x)

Given a value, returns 1.0 if less than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the sign value.


ffxZeroOneIsSigned

Copied!

FfxFloat32x3  ffxZeroOneIsSigned (FfxFloat32x3  x)

Given a value, returns 1.0 if less than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the sign value.


ffxZeroOneIsSigned

Copied!

FfxFloat32x4  ffxZeroOneIsSigned (FfxFloat32x4  x)

Given a value, returns 1.0 if less than zero and 0.0 if not.

Parameters:

x

The value to be compared.

Returns:

Result of the sign value.


ffxRec709FromLinear

Copied!

FfxFloat32  ffxRec709FromLinear (FfxFloat32  color)

Compute a Rec.709 color space.

Rec.709 is used for some HDTVs.

Both Rec.709 and sRGB have a linear segment which as spec’ed would intersect the curved segment 2 times. (a.) For 8-bit sRGB, steps {0 to 10.3} are in the linear region (4% of the encoding range). (b.) For 8-bit 709, steps {0 to 20.7} are in the linear region (8% of the encoding range).

Parameters:

color

The color to convert to Rec. 709.

Returns:

The color in linear space.


ffxRec709FromLinear

Copied!

FfxFloat32x2  ffxRec709FromLinear (FfxFloat32x2  color)

Compute a Rec.709 color space.

Rec.709 is used for some HDTVs.

Both Rec.709 and sRGB have a linear segment which as spec’ed would intersect the curved segment 2 times. (a.) For 8-bit sRGB, steps {0 to 10.3} are in the linear region (4% of the encoding range). (b.) For 8-bit 709, steps {0 to 20.7} are in the linear region (8% of the encoding range).

Parameters:

color

The color to convert to Rec. 709.

Returns:

The color in linear space.


ffxRec709FromLinear

Copied!

FfxFloat32x3  ffxRec709FromLinear (FfxFloat32x3  color)

Compute a Rec.709 color space.

Rec.709 is used for some HDTVs.

Both Rec.709 and sRGB have a linear segment which as spec’ed would intersect the curved segment 2 times. (a.) For 8-bit sRGB, steps {0 to 10.3} are in the linear region (4% of the encoding range). (b.) For 8-bit 709, steps {0 to 20.7} are in the linear region (8% of the encoding range).

Parameters:

color

The color to convert to Rec. 709.

Returns:

The color in linear space.


ffxLinearFromRec709

Copied!

FfxFloat32  ffxLinearFromRec709 (FfxFloat32  color)

Compute a linear value from a REC.709 value.

Parameters:

color

The value to convert to linear from REC.709.

Returns:

A value in linear space.


ffxLinearFromRec709

Copied!

FfxFloat32x2  ffxLinearFromRec709 (FfxFloat32x2  color)

Compute a linear value from a REC.709 value.

Parameters:

color

The value to convert to linear from REC.709.

Returns:

A value in linear space.


ffxLinearFromRec709

Copied!

FfxFloat32x3  ffxLinearFromRec709 (FfxFloat32x3  color)

Compute a linear value from a REC.709 value.

Parameters:

color

The value to convert to linear from REC.709.

Returns:

A value in linear space.


ffxGammaFromLinear

Copied!

FfxFloat32  ffxGammaFromLinear (FfxFloat32  value, FfxFloat32  power)

Compute a gamma value from a linear value.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Note: ‘rcpX’ is ‘1/x’, where the ‘x’ is what would be used in ffxLinearFromGamma.

Parameters:

value

The value to convert to gamma space from linear.

power

The reciprocal of power value used for the gamma curve.

Returns:

A value in gamma space.


ffxGammaFromLinear

Copied!

FfxFloat32x2  ffxGammaFromLinear (FfxFloat32x2  value, FfxFloat32  power)

Compute a gamma value from a linear value.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Note: ‘rcpX’ is ‘1/x’, where the ‘x’ is what would be used in ffxLinearFromGamma.

Parameters:

value

The value to convert to gamma space from linear.

power

The reciprocal of power value used for the gamma curve.

Returns:

A value in gamma space.


ffxGammaFromLinear

Copied!

FfxFloat32x3  ffxGammaFromLinear (FfxFloat32x3  value, FfxFloat32  power)

Compute a gamma value from a linear value.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Note: ‘rcpX’ is ‘1/x’, where the ‘x’ is what would be used in ffxLinearFromGamma.

Parameters:

value

The value to convert to gamma space from linear.

power

The reciprocal of power value used for the gamma curve.

Returns:

A value in gamma space.


ffxLinearFromGamma

Copied!

FfxFloat32  ffxLinearFromGamma (FfxFloat32  color, FfxFloat32  power)

Compute a linear value from a value in a gamma space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

color

The value to convert to linear in gamma space.

power

The power value used for the gamma curve.

Returns:

A value in linear space.


ffxLinearFromGamma

Copied!

FfxFloat32x2  ffxLinearFromGamma (FfxFloat32x2  color, FfxFloat32  power)

Compute a linear value from a value in a gamma space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

color

The value to convert to linear in gamma space.

power

The power value used for the gamma curve.

Returns:

A value in linear space.


ffxLinearFromGamma

Copied!

FfxFloat32x3  ffxLinearFromGamma (FfxFloat32x3  color, FfxFloat32  power)

Compute a linear value from a value in a gamma space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

color

The value to convert to linear in gamma space.

power

The power value used for the gamma curve.

Returns:

A value in linear space.


ffxPQFromLinear

Copied!

FfxFloat32  ffxPQFromLinear (FfxFloat32  value)

Compute a PQ value from a linear value.

Parameters:

value

The value to convert to PQ from linear.

Returns:

A value in linear space.


ffxPQFromLinear

Copied!

FfxFloat32x2  ffxPQFromLinear (FfxFloat32x2  value)

Compute a PQ value from a linear value.

Parameters:

value

The value to convert to PQ from linear.

Returns:

A value in linear space.


ffxPQFromLinear

Copied!

FfxFloat32x3  ffxPQFromLinear (FfxFloat32x3  value)

Compute a PQ value from a linear value.

Parameters:

value

The value to convert to PQ from linear.

Returns:

A value in linear space.


ffxLinearFromPQ

Copied!

FfxFloat32  ffxLinearFromPQ (FfxFloat32  value)

Compute a linear value from a value in a PQ space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

value

The value to convert to linear in PQ space.

Returns:

A value in linear space.


ffxLinearFromPQ

Copied!

FfxFloat32x2  ffxLinearFromPQ (FfxFloat32x2  value)

Compute a linear value from a value in a PQ space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

value

The value to convert to linear in PQ space.

Returns:

A value in linear space.


ffxLinearFromPQ

Copied!

FfxFloat32x3  ffxLinearFromPQ (FfxFloat32x3  value)

Compute a linear value from a value in a PQ space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

value

The value to convert to linear in PQ space.

Returns:

A value in linear space.


ffxSrgbFromLinear

Copied!

FfxFloat32  ffxSrgbFromLinear (FfxFloat32  value)

Compute an SRGB value from a linear value.

Parameters:

value

The value to convert to SRGB from linear.

Returns:

A value in SRGB space.


ffxSrgbFromLinear

Copied!

FfxFloat32x2  ffxSrgbFromLinear (FfxFloat32x2  value)

Compute an SRGB value from a linear value.

Parameters:

value

The value to convert to SRGB from linear.

Returns:

A value in SRGB space.


ffxSrgbFromLinear

Copied!

FfxFloat32x3  ffxSrgbFromLinear (FfxFloat32x3  value)

Compute an SRGB value from a linear value.

Parameters:

value

The value to convert to SRGB from linear.

Returns:

A value in SRGB space.


ffxLinearFromSrgb

Copied!

FfxFloat32  ffxLinearFromSrgb (FfxFloat32  value)

Compute a linear value from a value in a SRGB space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

value

The value to convert to linear in SRGB space.

Returns:

A value in linear space.


ffxLinearFromSrgb

Copied!

FfxFloat32x2  ffxLinearFromSrgb (FfxFloat32x2  value)

Compute a linear value from a value in a SRGB space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

value

The value to convert to linear in SRGB space.

Returns:

A value in linear space.


ffxLinearFromSrgb

Copied!

FfxFloat32x3  ffxLinearFromSrgb (FfxFloat32x3  value)

Compute a linear value from a value in a SRGB space.

Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native.

Parameters:

value

The value to convert to linear in SRGB space.

Returns:

A value in linear space.


ffxRemapForQuad

Copied!

FfxUInt32x2  ffxRemapForQuad (FfxUInt32  a)

A remapping of 64×1 to 8×8 imposing rotated 2×2 pixel quads in quad linear.

Remap illustration:

Copied!

543210
~~~~~~
..xxx.
yy...y

Parameters:

a

The input 1D coordinates to remap.

Returns:

The remapped 2D coordinates.


ffxRemapForWaveReduction

Copied!

FfxUInt32x2  ffxRemapForWaveReduction (FfxUInt32  a)

A helper function performing a remap 64×1 to 8×8 remapping which is necessary for 2D wave reductions.

The 64-wide lane indices to 8×8 remapping is performed as follows:

Copied!

00 01 08 09 10 11 18 19
02 03 0a 0b 12 13 1a 1b
04 05 0c 0d 14 15 1c 1d
06 07 0e 0f 16 17 1e 1f
20 21 28 29 30 31 38 39
22 23 2a 2b 32 33 3a 3b
24 25 2c 2d 34 35 3c 3d
26 27 2e 2f 36 37 3e 3f

Parameters:

a

The input 1D coordinate to remap.

Returns:

The remapped 2D coordinates.


Macros

FFX_FALSE

Copied!

#define FFX_FALSE (false)

A define for a false value in a boolean expression.


FFX_NEGATIVE_INFINITY_FLOAT

Copied!

#define FFX_NEGATIVE_INFINITY_FLOAT ffxAsFloat(0xff800000u)

A define value for negative infinity.


FFX_PI

Copied!

#define FFX_PI (3.14159)

A define value for PI.


FFX_POSITIVE_INFINITY_FLOAT

Copied!

#define FFX_POSITIVE_INFINITY_FLOAT ffxAsFloat(0x7f800000u)

A define value for positive infinity.


FFX_TRUE

Copied!

#define FFX_TRUE (true)

A define for a true value in a boolean expression.