MaterialShader and Diffuse Colour?

Dec 1, 2010 at 4:31 AM
Edited Dec 2, 2010 at 6:54 AM

Hello,

I have some basic test models that each have a simple material on it.  The materials diffuse color is set to something (for the sake of this example, lets say red).  When I load it in XNA with the basic effect fx from microsoft, it appears correct (ie. its colored red).  However, when I load it in Xen, it suddenly become white.

I've tracked it down to an issue in the MaterialShader where the CustomTexture is defaulted to a WhiteTexture (since its not using any textures, its defaulted to white).

I wanted to know (since I can't seem to find it), if the material shader even takes the diffuse color of a model into consideration?  Has anyone changed this to shade the default white texture to the diffuse color of a model?

 

EDIT: I've solve this issue.  It requires a directional light, which can be mapped to the camera's direction to use the diffuse color of a model.

 

Thanks,

ilarion