?/TD>
Microsoft DirectX 9.0

expp (Vertex Shader)


Provides partial precision exponential 2x.

Syntax

expp dst, src

where

Remarks

Vertex shader versions1_12_02_x2_sw3_03_sw
exppxxxxxx

The following code fragment shows the operations performed.

float w = src.w;
float v = (float)floor(src.w);
dest.x = (float)pow(2, v);
dest.y = w - v;

// Reduced precision exponent
float tmp = (float)pow(2, w);
DWORD tmpd = *(DWORD*)&tmp & 0xffffff00;
dest.z = *(float*)&tmpd;
dest.w = 1;

This instruction provides exponential base 2 partial precision. It allows for a more accurate determination of dest.x*function(dest.y), where function is a user approximation to 2*dest.y over the limited range where dest.y is between 0.0 and 1.0.

This instruction provides 10-bit precision.

Instruction Information

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.