Semantics, shaders, and fixups

H. Verbeet hverbeet at gmail.com
Mon Jul 3 06:16:00 CDT 2006


On 03/07/06, Ivan Gyurdiev <ivg231 at gmail.com> wrote:
> So, are the names in the D3DVSD_REGISTER enumeration meaningless?
>From the shader's point of view, yes.

> Why is D3DVSDE_POSITION called that way?
IIRC the names somehow correspond to the way inputs are mapped for
fixed function, but I'm not too sure on the details.

> If that works for d3d8, why doesn't it work for d3d9?
> D3D9 have types as well on each semantic, and D3DCOLOR is one of the types.
It probably would. At the time, the arrayUsageMap was more convenient
to use though.

> I see - I must have misunderstood that we need the fixup to be applied
> because of the way OpenGL expects the color data after the shader is
> executed.
It's because of the way OpenGL (or rather D3D :-)) expects the data on
input to the vertex processing stage. Because vertex shaders replace
the fixed function vertex processing stage, we can change the way it
expects the data rather than fixing up the data itself.

> You're saying that's just the standard way to assign a
> D3DCOLOR to x,y,z,w components...
Yes. Also see MSDN for D3DVSDT_D3DCOLOR vs D3DVSDT_UBYTE4.



More information about the wine-devel mailing list