Thanks Ian. That works. Is there an RGBA() command similar to the DirectX ultility function for DarkGDK? I know there is RGB() but when setting (or getting) the Diffuse it'd be nice to easily extract each component including the alpha.
Here is the next problem:
I set the diffuse color, it outputs correctly using dbGetVertexDataDiffuse(). Now in my shader I want to use the diffuse color, but it's always zero.
OUT.color = tex2D( layer1Sampler, IN.texture0 ) * IN.color;
If I use that in my PS the result is a black object. But I get a textured object if I don't use the diffuse color:
OUT.color = tex2D( layer1Sampler, IN.texture0 );
I am randomly setting vertices in the model to have a diffuse of black or white, so some texture should show in the first PS code snippet.
Any ideas?
Updated:
Even simpler, here is the puzzling part. When I set the diffuse color with dbSetVertexDataDiffuse, I output it with dbGetVertexdataDiffuse and it outputs correctly. I chagned my PS to just do:
The model appears all black. Why is the PS not getting the diffuse color of the model? It should have white and black verts.