What are the differences between the two approaches to coloring my Direct3D model?
What are the differences between the two approaches to coloring my Direct3D model?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well if you do it via a material then the whole Draw(Indexed)Primitive call will provide you with a single colour in the lighting equation (ie the one set in set material).
If you set it as a per-vertex colour then each vertex can have a different colour AND each colour will be interpolated across the polygon.
Of course bear in mind that you have different colours that can come from per-vertex and material (ie Emissive, Ambient, Diffuse and Specular). To truly understand what it is doing under the hood I recommend you read the article on the mathematics of lighting in MSDN.