PDA

View Full Version : Creating transformation pipeline, lost in last step



cronodragon
28-01-2008, 12:57 AM
I'm creating my own transformation pipeline for fun. Found this information in DX SDK:

http://msdn2.microsoft.com/en-us/library/bb206260(VS.85,printer).aspx

In step 7 they have this:

http://msdn2.microsoft.com/en-us/library/Bb206260.d3dxfrm69(en-us,VS.85).gif

But where do they get that W from? Is it the W component of the vector after being transformed in step 6? It doesn't have a subindex :P

X, Y and Z don't have a subindex neither, but I suppose that X = Xm, Y = Ym, Z = Zm, and W = Wm = 1, as they said at the beginning:


If a vertex in the model coordinate is given by Pm = (Xm, Ym, Zm, 1), then the following transformations are applied to compute screen coordinates Ps = (Xs, Ys, Zs, Ws):

OTOH that doesn't have sense, since all the transformation would be a division by a factor from the pipeline. Then got no idea :S

Thanks!

JSoftware
28-01-2008, 12:08 PM
W is simply the fourth component of the vector. You transform the affine vector to a homogenous vector by dividing all factors with W

the X,Y,Z,W they refer to in step 7 would probably be Xvs, Yvs, Zvs, Wvs, which comes from multiplying by Mvs

cronodragon
28-01-2008, 03:26 PM
Oh, I see! Thanks! :D