WINED3D: Color fixups for vertex shaders

Roderick Colenbrander thunderbird2k at
Fri Mar 10 08:39:44 CST 2006

> In particular, is it the fixup for DIFFUSE, SPECULAR or either that
> causes the problem? What are the values for reg,
> It looks like texture coordinates are wrong, but those shouldn't be
> affected by this patch, do you initialise arrayUsageMap correctly?

I have walked through the code. This small demo (dolphinvs from dx8.1 sdk)
uses the following vertex declaration for the seafloor:
D3DVSD_REG( 0, D3DVSDT_FLOAT3 ), // Position of first mesh
D3DVSD_REG( 3, D3DVSDT_FLOAT3 ), // Normal
D3DVSD_REG( 6, D3DVSDT_FLOAT2 ), // Tex coords

It stores texture coordinates in register 6 (D3DVSD_SPECULAR). Registers
should be general purpose I think and this should work fine. Your patch
assumes that 'D3DVSD_SPECULAR' is allways used for colors which should be
swizzled. Because we are storing texture coordinates in them they shouldn't
be swizzled but we don't know what is stored in them. I'm not sure how to
fix this bug but I think the code should be moved to a later stage.
Swizzling won't be done in the shader then :(


Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden:

More information about the wine-devel mailing list