D3D Question

Started by
3 comments, last by Paco 24 years, 3 months ago
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
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.
--Shannon Schlomer, BLAZE Technologies, Inc.
Thanks

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

Thanks again, Paco
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.
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

This topic is closed to new replies.

Advertisement