Hey everyone!!
I am wondering if is there any possibility of setting up a true linear colored vertex buffer in DirectX9.
A usual custom vertex buffer in DX9 would be like this:
struct VertexBuffer
{
D3DXVECTOR3 m_position;
D3DXVECTOR3 m_normal;
D3DCOLOR m_color;
D3DXVECTOR2 m_tex;
}
And what I would like it to be is this:
struct VertexBuffer
{
D3DXVECTOR3 m_position;
D3DXVECTOR3 m_normal;
D3DXVECTOR4 m_color;
D3DXVECTOR2 m_tex;
}
The problem is that the shading phase with the input is accepting correctly the D3DCOLOR which must be doing something extra internally to transform it. But I am unable to make the second VB type to work properly.
struct VS_INPUT
{
float3 m_position : POSITION;
float3 m_normal : NORMAL;
float4 m_color : COLOR;
float2 m_uv : TEXCOORD0;
};
I have already done it in DX11 but I am struggling with DX9.
What am I missing? Maybe DX9 is not ready to do that?
Any help will be welcomed!