type: usage:FLOAT3 POSITIONFLOAT3 NORMALD3DCOLOR COLOR
and from dxsdk docs about D3DCOLOR type:
Quote:
4-D packed unsigned bytes mapped to 0 to 1 range. Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A).
so its 32 bit color value?
and in my shader i must set it as float4 for it to work:
float4x4 WorldViewProjection;struct VertexData{ float3 Position : POSITION; float3 Normal : NORMAL; float4 Color : COLOR;};struct VertexOutput{ float4 Position : POSITION; float4 Color : TEXCOORD0;};struct PixelOutput{ float4 Color : COLOR0;};void VS(in VertexData IN, out VertexOutput OUT){ OUT.Position = mul(float4(IN.Position.xyz, 1.0f), WorldViewProjection); OUT.Color = IN.Color;}void PS(in VertexOutput IN, out PixelOutput OUT){ OUT.Color = IN.Color;}technique Tech{ pass p0 { VertexShader = compile vs_3_0 VS(); PixelShader = compile ps_3_0 PS(); }}
but its 4 x 32 bit???
Is there some conversation behind scene that i am not aware of?
EDIT: i have another question on same shader:
if i set:
row_major float4x4 WorldViewProjection;//like D3DXMATRIX//column_major float4x4 WorldViewProjection;
row-major packing matrices has 5 instruction slots used
and column-major has 6 instruction slots used
but in dxsdk they say that column-major is efficient then row-major.