Export (0) Print
Expand All

expp - vs

Provides partial precision exponential 2x.

Syntax

expp dst, src.{x|y|z|w}

 

Where:

  • dst is the destination register.
  • src is a source register. Source register requires explicit use of replicate swizzle, that is, exactly one of the .x, .y, .z, .w swizzle components (or the .r, .g, .b, .a equivalents) must be specified.
  • {x|y|z|w} is the required replicate swizzle on source register.

Remarks

Vertex shader versions1_12_02_x2_sw3_03_sw
exppxxxxxx

 

vs_1_1

The exp - vs instruction operates differently depending on vertex shader versions.

In vs_1_1, the expp instruction gives the following results:



v = the scalar value from the source register with a replicate swizzle

dest.x = pow(2, floor(v))
dest.y = v - floor(v)
dest.z = pow(2, v) (partial-precision)
dest.w = 1


In vs_2_0 and up, the expp instruction gives the following results:



v = the scalar value from the source register with a replicate swizzle

dest.x = dest.y = dest.z = dest.y = pow(2, v) (partial-precision)


vs_2_0

In vs_2_0 and up, the instruction works like this:



float V = the scalar value from the source register with a replicate swizzle

dest.x = dest.y = dest.z = dest.y = pow( 2, V ) (partial-precision)


The instruction provides at least 10 bits of precision.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft