Microsoft DirectX 8.0 (C++) |
Calculates the distance vector.
dst vDest, vSrc0, vSrc1
The following code fragment shows the operations performed by the dst instruction to write a result to the destination.
SetDestReg(); SetSrcReg(0); SetSrcReg(1); m_TmpReg.x = 1; m_TmpReg.y = m_Source[0].y * m_Source[1].y; m_TmpReg.z = m_Source[0].z; m_TmpReg.w = m_Source[1].w; WriteResult();
The first source operand is assumed to be the vector (ignored, d*d, d*d, ignored) and the second source operand is assumed to be the vector (ignored, 1/d, ignored, 1/d). The destination is the result vector (1, d, d*d, 1/d).
The following example illustrates how the dst instruction might be used.
dst r4, r0, r1