• Advertisement

Archived

This topic is now archived and is closed to further replies.

D3D Question

This topic is 6593 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi My question is: if I specify a color for each vertex of a triangle (for gradients), how can I affect those colors with the current material. I''ve try the LIGHTSTATE_COLORVERTEX btu it doesnt work. Thanks, Paco

Share this post


Link to post
Share on other sites
Advertisement
Don''t use materials if you want to specify colors on a per-vertex basis. By doing this, you are, in effect, doing your own custom materials.

--Shannon Schlomer, BLAZE Technologies, Inc.

Share this post


Link to post
Share on other sites
Thanks

So, you mean I must do the lighting calculations by myself?
there''s no way to illuminate those vertex??

Thanks again, Paco

Share this post


Link to post
Share on other sites
Lighting is no longer done based on vertex format, it''s done on the D3DRENDERSTATE_LIGHTING state (which is why a lot of people got black triangles when switching from DX6 to DX7, didn''t specify light and a default of black lights was used) , so I think just specify the vertex colors, and it should do it.

I haven''t tried this though.

Share this post


Link to post
Share on other sites
Thanks, mhkrause

Im not using DX7, but its not a problem. So in DX6 i cant achive that??? weird, but it can be fixed easily. Thanks a lot guys!!

Paco

Share this post


Link to post
Share on other sites

  • Advertisement