I want to have blocks of basic colors specified with RGB(A). But I can’t get it to work. The colors seems to be distorted.
I use the material technique:
Techniques/NoTextureVCol.xml
And I set the material for each block as follows:
SharedPtr m = model->GetMaterial()->Clone();
// color contains the specific block color.
m->SetShaderParameter(“MatDiffColor”,Vector4(color.x_/255.0f, color.y_/255.0f, color.z_/255.0f, 1.0f));
model->SetMaterial(m);
The result becomes like this (the physic-blocks):
I want the blocks to have the same colors as the original blocks in the world. But as seen the blocks are multicolored and not one color.
What am I missing here?